Skip to content

Fix 15030: Extra comment missing from inline multi-suppression - #8852

Open
ludviggunne wants to merge 4 commits into
cppcheck-opensource:mainfrom
ludviggunne:15030-multi-suppr-extra
Open

ludviggunne wants to merge 4 commits into
cppcheck-opensource:mainfrom
ludviggunne:15030-multi-suppr-extra

Conversation

@ludviggunne

Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread lib/suppressions.cpp Outdated
std::size_t delimSize = 1;

if (extraPos == std::string::npos) {
extraPos = comment.find("//", end_position);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

so if there is a semicolon in the extra comment we don't look for "//" ?

//cppcheck-suppress[errorId1, errorId2 symbolName=arr] // extra; comment

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.

Good catch. Actually, the same applies to single suppression comments. Should I fix that too?

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