We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8b276cb commit d464e63Copy full SHA for d464e63
1 file changed
lib/tokenize.cpp
@@ -3343,7 +3343,9 @@ bool Tokenizer::simplifyUsing()
3343
// function pointer
3344
TokenList::copyTokens(tok1->next(), fpArgList, usingEnd->previous());
3345
Token* const copyEnd = TokenList::copyTokens(tok1, start, fpQual->link()->previous());
3346
- Token* const leftPar = copyEnd->tokAt(copyEnd->strAt(-1) == "(" ? -1 : -2);
+ Token* leftPar = copyEnd->previous();
3347
+ while (leftPar->str() != "(")
3348
+ leftPar = leftPar->previous();
3349
Token* const rightPar = copyEnd->next()->insertToken(")");
3350
Token::createMutualLinks(leftPar, rightPar);
3351
tok1->deleteThis();
0 commit comments