Skip to content

Commit a1bbdf5

Browse files
Update symboldatabase.cpp
1 parent 391ccbc commit a1bbdf5

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

lib/symboldatabase.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8036,9 +8036,13 @@ void SymbolDatabase::setValueTypeInTokenList(bool reportDebugWarnings, Token *to
80368036
}
80378037
//Is iterator fetching function called?
80388038
} else if (Token::simpleMatch(tok->astOperand1(), "::") &&
8039-
tok->astOperand2() &&
8040-
tok->astOperand2()->isVariable()) {
8041-
const auto* const paramVariable = tok->astOperand2()->variable();
8039+
tok->astOperand2()) {
8040+
const Token* varTok = tok->astOperand2();
8041+
while (Token::simpleMatch(varTok, "["))
8042+
varTok = varTok->astOperand1();
8043+
if (Token::simpleMatch(varTok, "."))
8044+
varTok = varTok->astOperand2();
8045+
const auto* const paramVariable = varTok->variable();
80428046
if (!paramVariable ||
80438047
!paramVariable->valueType() ||
80448048
!paramVariable->valueType()->container) {

0 commit comments

Comments
 (0)