This commit is contained in:
parent
436c5c8efc
commit
4ce76d0b58
|
@ -5455,11 +5455,8 @@ const Function* SymbolDatabase::findFunction(const Token *tok) const
|
||||||
if (tok1->strAt(-2) == ">") {
|
if (tok1->strAt(-2) == ">") {
|
||||||
if (tok1->linkAt(-2))
|
if (tok1->linkAt(-2))
|
||||||
tok1 = tok1->linkAt(-2)->tokAt(-1);
|
tok1 = tok1->linkAt(-2)->tokAt(-1);
|
||||||
else {
|
else
|
||||||
if (mSettings->debugwarnings)
|
break;
|
||||||
debugMessage(tok1->tokAt(-2), "debug", "SymbolDatabase::findFunction found '>' without link.");
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
} else
|
} else
|
||||||
tok1 = tok1->tokAt(-2);
|
tok1 = tok1->tokAt(-2);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4380,7 +4380,13 @@ private:
|
||||||
void symboldatabase65() {
|
void symboldatabase65() {
|
||||||
// don't crash on missing links from instantiation of template with typedef
|
// don't crash on missing links from instantiation of template with typedef
|
||||||
check("int ( * X0 ) ( long ) < int ( ) ( long ) > :: f0 ( int * ) { return 0 ; }");
|
check("int ( * X0 ) ( long ) < int ( ) ( long ) > :: f0 ( int * ) { return 0 ; }");
|
||||||
ASSERT_EQUALS("[test.cpp:1]: (debug) SymbolDatabase::findFunction found '>' without link.\n", errout.str());
|
ASSERT_EQUALS("", errout.str());
|
||||||
|
|
||||||
|
check("int g();\n" // #11385
|
||||||
|
"void f(int i) {\n"
|
||||||
|
" if (i > ::g()) {}\n"
|
||||||
|
"}\n");
|
||||||
|
ASSERT_EQUALS("", errout.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void symboldatabase66() { // #8540
|
void symboldatabase66() { // #8540
|
||||||
|
|
Loading…
Reference in New Issue