Skip to content

Commit 754640a

Browse files
Update astutils.cpp
1 parent 0492781 commit 754640a

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

lib/astutils.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1617,8 +1617,12 @@ bool isSameExpression(bool macro, const Token *tok1, const Token *tok2, const Se
16171617
const Token *followTok1 = tok1, *followTok2 = tok2;
16181618
while (Token::simpleMatch(followTok1, "::"))
16191619
followTok1 = followTok1->astOperand2() ? followTok1->astOperand2() : followTok1->astOperand1();
1620+
if (!followTok1)
1621+
followTok1 = tok1; // TODO: remove after #14235 has been fixed
16201622
while (Token::simpleMatch(followTok2, "::"))
16211623
followTok2 = followTok2->astOperand2() ? followTok2->astOperand2() : followTok2->astOperand1();
1624+
if (!followTok2)
1625+
followTok2 = tok2;
16221626
if (isSameConstantValue(macro, followTok1, followTok2))
16231627
return true;
16241628

0 commit comments

Comments
 (0)