We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 15a4f63 commit 32d7f79Copy full SHA for 32d7f79
1 file changed
lib/tokenize.cpp
@@ -8920,7 +8920,7 @@ void Tokenizer::findGarbageCode() const
8920
if (Token::Match(tok, "!|~ %comp%") &&
8921
!(cpp && tok->strAt(1) == ">" && Token::simpleMatch(tok->tokAt(-1), "operator")))
8922
syntaxError(tok);
8923
- if (Token::Match(tok, "] %name%") && (!cpp || !(tok->tokAt(-1) && Token::simpleMatch(tok->tokAt(-2), "delete [")))) {
+ if (Token::Match(tok, "] %name%") && (!cpp || !(tok->tokAt(1)->isKeyword() || (tok->tokAt(-1) && Token::simpleMatch(tok->tokAt(-2), "delete ["))))) {
8924
if (tok->next()->isUpperCaseName())
8925
unknownMacroError(tok->next());
8926
else
0 commit comments