Fix functionConst TODO (#5261)
This commit is contained in:
parent
101ddea1e6
commit
2cf4b3a6f3
|
@ -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);
|
||||
|
|
|
@ -6061,7 +6061,7 @@ private:
|
|||
" 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"
|
||||
|
|
Loading…
Reference in New Issue