Skip to content

Commit 6c75206

Browse files
committed
Fix #14483
1 parent fca8072 commit 6c75206

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

lib/symboldatabase.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5266,6 +5266,21 @@ const Variable *Scope::getVariable(const std::string &varname) const
52665266

52675267
static const Token* skipPointers(const Token* tok)
52685268
{
5269+
while (tok) {
5270+
if (Token::simpleMatch(tok, "::")) {
5271+
tok = tok->next();
5272+
continue;
5273+
}
5274+
if (Token::Match(tok, "%type% ::")) {
5275+
tok = tok->tokAt(2);
5276+
continue;
5277+
}
5278+
if (Token::Match(tok, "%type% <") && tok->next()->link()) {
5279+
tok = tok->linkAt(1)->next();
5280+
continue;
5281+
}
5282+
break;
5283+
}
52695284
while (Token::Match(tok, "*|&|&&") || (Token::Match(tok, "( [*&]") && Token::Match(tok->link()->next(), "(|["))) {
52705285
tok = tok->next();
52715286
if (tok && tok->strAt(-1) == "(" && Token::Match(tok, "%type% ::"))

0 commit comments

Comments
 (0)