Skip to content

Commit b99ef70

Browse files
Update tokenlist.cpp
1 parent ebb2fee commit b99ef70

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: lib/tokenlist.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -960,7 +960,10 @@ static void compilePrecedence2(Token *&tok, AST_state& state)
960960
tok = tok->tokAt(3);
961961
break;
962962
}
963-
compileBinOp(tok, state, compileScope);
963+
if (!Token::Match(tok->tokAt(-1), "[{,]"))
964+
compileBinOp(tok, state, compileScope);
965+
else
966+
compileUnaryOp(tok, state, compileScope);
964967
} else if (tok->str() == "[") {
965968
if (state.cpp && isPrefixUnary(tok, /*cpp*/ true) && Token::Match(tok->link(), "] (|{|<")) { // Lambda
966969
// What we do here:

0 commit comments

Comments
 (0)