We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 22b3464 commit e843706Copy full SHA for e843706
1 file changed
lib/tokenize.cpp
@@ -3862,7 +3862,8 @@ void Tokenizer::simplifyRedundantConsecutiveBraces()
3862
for (Token *tok = list.front(); tok;) {
3863
if (Token::simpleMatch(tok, "= {")) {
3864
tok = tok->linkAt(1);
3865
- } else if (Token::simpleMatch(tok, "{ {") && Token::simpleMatch(tok->linkAt(1), "} }")) {
+ } else if (Token::simpleMatch(tok, "{ {") && Token::simpleMatch(tok->linkAt(1), "} }") &&
3866
+ !Token::Match(tok->previous(), "%name%")) {
3867
//remove internal parentheses
3868
tok->linkAt(1)->deleteThis();
3869
tok->deleteNext();
0 commit comments