We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 539258f commit 46f726cCopy full SHA for 46f726c
lib/tokenize.cpp
@@ -1153,9 +1153,12 @@ void Tokenizer::simplifyTypedef()
1153
int back = int(classLevel) - 1;
1154
bool good = true;
1155
// check for extra qualification
1156
- while (back >= 0 && Token::Match(start->tokAt(-2), "%type% ::")) {
1157
- if (start->strAt(-2) == spaceInfo[back].className) {
1158
- start = start->tokAt(-2);
+ while (back >= 0) {
+ const Token *qualificationTok = start->tokAt(-2);
+ if (!Token::Match(qualificationTok, "%type% ::")
1159
+ break;
1160
+ if (qualificationTok->str() == spaceInfo[back].className) {
1161
+ start = qualificationTok;
1162
back--;
1163
count++;
1164
} else {
0 commit comments