Skip to content

Commit 1ef66ad

Browse files
Update astutils.cpp
1 parent 32ab9d1 commit 1ef66ad

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/astutils.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1615,10 +1615,10 @@ bool isSameExpression(bool macro, const Token *tok1, const Token *tok2, const Se
16151615
return false;
16161616

16171617
const Token *followTok1 = tok1, *followTok2 = tok2;
1618-
while (Token::simpleMatch(followTok1, "::") && followTok1->astOperand2())
1619-
followTok1 = followTok1->astOperand2();
1618+
while (Token::simpleMatch(followTok1, "::"))
1619+
followTok1 = followTok1->astOperand2() ? followTok1->astOperand2() : followTok1->astOperand1();
16201620
while (Token::simpleMatch(followTok2, "::") && followTok2->astOperand2())
1621-
followTok2 = followTok2->astOperand2();
1621+
followTok2 = followTok2->astOperand2() ? followTok2->astOperand2() : followTok2->astOperand1();
16221622
if (isSameConstantValue(macro, followTok1, followTok2))
16231623
return true;
16241624

0 commit comments

Comments
 (0)