Skip to content

Fix #14634: Inconsistent AST for array declarations#8610

Open
ludviggunne wants to merge 1 commit into
cppcheck-opensource:mainfrom
ludviggunne:14634
Open

Fix #14634: Inconsistent AST for array declarations#8610
ludviggunne wants to merge 1 commit into
cppcheck-opensource:mainfrom
ludviggunne:14634

Conversation

@ludviggunne

Copy link
Copy Markdown
Collaborator

No description provided.

@ludviggunne ludviggunne marked this pull request as draft June 2, 2026 14:22
Comment thread lib/tokenlist.cpp
Comment thread lib/tokenlist.cpp
@ludviggunne ludviggunne marked this pull request as ready for review July 14, 2026 14:00
Comment thread lib/vf_settokenvalue.cpp
const Settings& settings,
SourceLocation loc)
SourceLocation loc,
bool recurseNamespaces)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we pass this as a flag? It is never set to false.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's set to false here: https://github.com/cppcheck-opensource/cppcheck/pull/8610/changes#diff-49c0f9d6942f6808cf091d306b42ae4639ff837acf2dcad90c28ed5c70cf850dR246. I wanted a way to propagate values both up and down namespace "stacks" without causing infinite recursion. I'm not super familiar with the value flow code though so there might be a better way.

Comment thread lib/vf_settokenvalue.cpp
Value value,
const Settings& settings,
SourceLocation loc)
SourceLocation loc,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The SourceLocation should always be the last parameter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants