Skip to content

Fix #14539: false positive: constParameterPointer with type alias#8310

Open
ludviggunne wants to merge 2 commits intodanmar:mainfrom
ludviggunne:14539
Open

Fix #14539: false positive: constParameterPointer with type alias#8310
ludviggunne wants to merge 2 commits intodanmar:mainfrom
ludviggunne:14539

Conversation

@ludviggunne
Copy link
Collaborator

No description provided.

fIsInitComma = (1ULL << 43), // Is this comma located inside some {..}. i.e: {1,2,3,4}
fIsInitBracket = (1ULL << 44), // Is this bracket used as a part of variable initialization i.e: int a{5}, b(2);
fIsAnonymous = (1ULL << 45), // Is this a token added for an unnamed member
fIsSimplifiedUsing = (1ULL << 46),
Copy link
Collaborator

Choose a reason for hiding this comment

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

simplifyUsing() already sets fIsSimplifiedTypedef, see e.g. here:

tok1->isSimplifiedTypedef(true);

So we should either use only the existing flag, or use the new one everywhere.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hm, that's strange, then we shouldn't have a false positive in the first place. I'll look in to it. Thanks!

@sonarqubecloud
Copy link

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.

2 participants