We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c524609 commit 4be28f0Copy full SHA for 4be28f0
1 file changed
lib/checkother.cpp
@@ -1290,7 +1290,7 @@ void CheckOther::checkVariableScope()
1290
tok = tok->link();
1291
1292
// parse else if blocks..
1293
- } else if (Token::simpleMatch(tok, "else { if (") && Token::simpleMatch(tok->linkAt(3), ") {")) {
+ } else if (Token::simpleMatch(tok, "else { if (") && tok->next()->isSimplifiedScope() && Token::simpleMatch(tok->linkAt(3), ") {")) {
1294
tok = tok->next();
1295
} else if (tok->varId() == var->declarationId() || tok->str() == "goto") {
1296
reduce = false;
0 commit comments