Skip to content

Commit

Permalink
Fix functionConst TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github committed Jul 24, 2023
1 parent d2546d5 commit 3bae681
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/symboldatabase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,7 @@ void SymbolDatabase::createSymbolDatabaseSetFunctionPointers(bool firstPass)
continue;

bool isTemplateArg = false;
if (tok->next()->str() != "(") {
if (!Token::Match(tok->next(), "(|{")) {
const Token *start = tok;
while (Token::Match(start->tokAt(-2), "%name% ::"))
start = start->tokAt(-2);
Expand Down
2 changes: 1 addition & 1 deletion test/testclass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6061,7 +6061,7 @@ class TestClass : public TestFixture {
" int i{};\n"
" S f() { return S{ &i }; }\n"
"};\n");
TODO_ASSERT_EQUALS("[test.cpp:7]: (style, inconclusive) Technically the member function 'C::f' can be const.\n", "", errout.str());
ASSERT_EQUALS("[test.cpp:7]: (style, inconclusive) Technically the member function 'C::f' can be const.\n", errout.str());

checkConst("struct S {\n"
" explicit S(const int* p) : mp(p) {}\n"
Expand Down

0 comments on commit 3bae681

Please sign in to comment.