Commit 7a068d65 authored by Christian Kamm's avatar Christian Kamm
Browse files

C++ parser: Fix bug with conditional expressions.

Reviewed-by: Erik Verbruggen
parent 283a3d32
...@@ -4877,7 +4877,7 @@ void Parser::parseExpressionWithOperatorPrecedence(ExpressionAST *&lhs, int minP ...@@ -4877,7 +4877,7 @@ void Parser::parseExpressionWithOperatorPrecedence(ExpressionAST *&lhs, int minP
if (operPrecedence == Prec::Conditional) { if (operPrecedence == Prec::Conditional) {
condExpr = new (_pool) ConditionalExpressionAST; condExpr = new (_pool) ConditionalExpressionAST;
condExpr->question_token = oper; condExpr->question_token = oper;
if (oper == T_COLON) { if (tok().kind() == T_COLON) {
// GNU extension: // GNU extension:
// logical-or-expression '?' ':' conditional-expression // logical-or-expression '?' ':' conditional-expression
condExpr->left_expression = 0; condExpr->left_expression = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment