Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .selfcheck_suppressions
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ autoNoType:gui/*.cpp
autoNoType:test/*.cpp
autoNoType:tools/triage/mainwindow.cpp
# ticket 11631
templateInstantiation:test/testutils.cpp
templateInstantiation

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 would prefer to have an entry for each file it occurs in so we would at least partially detect future regressions. Heck, we should probably move this to the source instead so we have actual individual suppressions.

Since the scope has widened additional tickets probably need to be filed.

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.

Well we need to suppress it everytime we use functions like contains or calculate, and we are a long ways from being able to instantiate those functions. This isnt catching any errors and just adding burden. I think it would be better as a seperate report like daca.

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 see. It is just a debug warning (those are tracked in daca). Still a new ticket for one of the additional cases would be good for tracking.


naming-varname:externals/simplecpp/simplecpp.h
naming-privateMemberVariable:externals/simplecpp/simplecpp.h
Expand Down
2 changes: 2 additions & 0 deletions cli/cmdlineparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1653,6 +1653,8 @@ CmdLineParser::Result CmdLineParser::parseFromArgs(int argc, const char* const a
mSettings.unmatchedSuppressionFilters.emplace_back("misra-*");
if (!mSettings.premium)
mSettings.unmatchedSuppressionFilters.emplace_back("premium-*");
if (!mSettings.debugwarnings)
mSettings.unmatchedSuppressionFilters.emplace_back("templateInstantiation");

if (inputAsFilter) {
mSettings.fileFilters.insert(mSettings.fileFilters.end(), mPathNames.cbegin(), mPathNames.cend());
Expand Down
4 changes: 4 additions & 0 deletions lib/checkclass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2334,6 +2334,10 @@ bool CheckClassImpl::isMemberVar(const Scope *scope, const Token *tok) const
if (Token::Match(tok->tokAt(-3), "%name% ) . %name%")) {
tok = tok->tokAt(-3);
again = true;
} else if (Token::Match(tok->tokAt(-2), ") . %name%")) {
// function call chain: the member is accessed through the return value
tok = tok->linkAt(-2)->previous();
again = true;
} else if (Token::Match(tok->tokAt(-2), "%name% . %name%")) {
tok = tok->tokAt(-2);
again = true;
Expand Down
Loading
Loading