Skip to content

Commit e843706

Browse files
Update tokenize.cpp
1 parent 22b3464 commit e843706

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/tokenize.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3862,7 +3862,8 @@ void Tokenizer::simplifyRedundantConsecutiveBraces()
38623862
for (Token *tok = list.front(); tok;) {
38633863
if (Token::simpleMatch(tok, "= {")) {
38643864
tok = tok->linkAt(1);
3865-
} else if (Token::simpleMatch(tok, "{ {") && Token::simpleMatch(tok->linkAt(1), "} }")) {
3865+
} else if (Token::simpleMatch(tok, "{ {") && Token::simpleMatch(tok->linkAt(1), "} }") &&
3866+
!Token::Match(tok->previous(), "%name%")) {
38663867
//remove internal parentheses
38673868
tok->linkAt(1)->deleteThis();
38683869
tok->deleteNext();

0 commit comments

Comments
 (0)