Skip to content

Commit 2cf4b3a

Browse files
Fix functionConst TODO (#5261)
1 parent 101ddea commit 2cf4b3a

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

lib/symboldatabase.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1107,7 +1107,7 @@ void SymbolDatabase::createSymbolDatabaseSetFunctionPointers(bool firstPass)
11071107
continue;
11081108

11091109
bool isTemplateArg = false;
1110-
if (tok->next()->str() != "(") {
1110+
if (!Token::Match(tok->next(), "(|{")) {
11111111
const Token *start = tok;
11121112
while (Token::Match(start->tokAt(-2), "%name% ::"))
11131113
start = start->tokAt(-2);

test/testclass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6061,7 +6061,7 @@ class TestClass : public TestFixture {
60616061
" int i{};\n"
60626062
" S f() { return S{ &i }; }\n"
60636063
"};\n");
6064-
TODO_ASSERT_EQUALS("[test.cpp:7]: (style, inconclusive) Technically the member function 'C::f' can be const.\n", "", errout.str());
6064+
ASSERT_EQUALS("[test.cpp:7]: (style, inconclusive) Technically the member function 'C::f' can be const.\n", errout.str());
60656065

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

0 commit comments

Comments
 (0)