We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a5a7dd7 commit caacea2Copy full SHA for caacea2
1 file changed
lib/tokenize.cpp
@@ -4970,7 +4970,7 @@ void Tokenizer::setVarIdPass1()
4970
decl = false;
4971
} else if (cpp && Token::Match(prev2, "%type% {") && Token::simpleMatch(tok2->link(), "} ;")) { // C++11 initialization style
4972
if (tok2->link() != tok2->next() && // add value-initialized variable T x{};
4973
- (Token::Match(prev2, "do|try|else") || Token::Match(prev2->tokAt(-2), "struct|class|:")))
+ (Token::Match(prev2, "do|try|else") || Token::simpleMatch(prev2->tokAt(-2), ":")))
4974
continue;
4975
} else
4976
0 commit comments