Repository navigation
fix(formula): check each optional before the evaluator reads it - #1243
Merged
Merged
Conversation
clang-tidy fails main on the formula sources: - `performance-no-automatic-move`: a const local stops the move of the `spell_reads` result. - `bugprone-unchecked-optional-access`: eight reads of an optional have no check that clang-tidy can see. `external_sheet_of` now refuses a reference that names no document. It read that document without a check. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017QtawyvLP2SCnoBtnVfFed
andiwand
force-pushed
the
fix/formula-tidy
branch
from
October 24, 2026 17:36
37fb5d7 to
94d96e1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 Generated with Claude Code
Summary
clang-tidy fails on main, in run 40111475073 and later runs:
performance-no-automatic-moveinformula_dependencies.cpp: a const local stops the move of thespell_readsresult.bugprone-unchecked-optional-access: eight reads of an optional insheet_recalculation.cppandformula_evaluator.cppcame in with feat(formula): compute NOW, TODAY, RAND, RANDBETWEEN and CELL #1236–feat(formula): compute a cycle where the document iterates #1240. Each one has no check that clang-tidy can see. The later main runs were cancelled before tidy reached these files, so local clang-tidy 22 found them.Changes:
iterate(cycle, iteration)takes the iteration settings that its caller checked.Call::valueandCall::arraybind the given value once.arraybefore it reads it.external_sheet_ofnow refuses a reference that names no document. It read that document without a check.The wasm size ratchet is fixed in the stacked PR.
Test