Skip to content

Fix #9383 ("debug: Function::addArguments found argument 'x' with var…#2238

Merged
danmar merged 1 commit into
cppcheck-opensource:masterfrom
IOBYTE:9383
Oct 6, 2019
Merged

Fix #9383 ("debug: Function::addArguments found argument 'x' with var…#2238
danmar merged 1 commit into
cppcheck-opensource:masterfrom
IOBYTE:9383

Conversation

@IOBYTE
Copy link
Copy Markdown
Contributor

@IOBYTE IOBYTE commented Oct 4, 2019

…id 0." with variadic templates)

Comment thread lib/tokenize.cpp
} else if (tok2->str() == "::") {
singleNameCount = 0;
} else if (tok2->str() != "*" && tok2->str() != "::") {
} else if (tok2->str() != "*" && tok2->str() != "::" && tok2->str() != "...") {
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.

Will thie be executed for C code as well?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes but it is already checking for "::" in a few places without checking the language. Should they all be fixed?

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.

I believe that we don't need special handling of C code for ::.. valid C code does not contain that operator.

But ... can be used in C code. However if there is valid C code that contains ... I would assume that should be handled the same way in C++ mode... so this either does not break C or it breaks both C and C++ parsing.

@danmar danmar merged commit 78b9fd9 into cppcheck-opensource:master Oct 6, 2019
jubnzv pushed a commit to jubnzv/cppcheck that referenced this pull request Nov 13, 2019
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.

3 participants