fix daca crash in openfst fst_test.cc (#3095)
This commit is contained in:
parent
f17d5b719a
commit
7700cff0e9
|
@ -5099,15 +5099,20 @@ const Function* SymbolDatabase::findFunction(const Token *tok) const
|
|||
}
|
||||
|
||||
if (currScope) {
|
||||
while (currScope && !(Token::Match(tok1, "%type% :: %name% [(),>]") ||
|
||||
while (currScope && tok1 && !(Token::Match(tok1, "%type% :: %name% [(),>]") ||
|
||||
(Token::Match(tok1, "%type% <") && Token::Match(tok1->linkAt(1), "> :: %name% (")))) {
|
||||
if (tok1->strAt(1) == "::")
|
||||
tok1 = tok1->tokAt(2);
|
||||
else
|
||||
else if (tok1->strAt(1) == "<")
|
||||
tok1 = tok1->linkAt(1)->tokAt(2);
|
||||
else
|
||||
tok1 = nullptr;
|
||||
|
||||
if (tok1)
|
||||
currScope = currScope->findRecordInNestedList(tok1->str());
|
||||
}
|
||||
|
||||
if (tok1)
|
||||
tok1 = tok1->tokAt(2);
|
||||
|
||||
if (currScope && tok1)
|
||||
|
|
Loading…
Reference in New Issue