diff options
Diffstat (limited to 'lib/Expr/Parser.cpp')
-rw-r--r-- | lib/Expr/Parser.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Expr/Parser.cpp b/lib/Expr/Parser.cpp index 572b9572..479ff6c2 100644 --- a/lib/Expr/Parser.cpp +++ b/lib/Expr/Parser.cpp @@ -998,8 +998,11 @@ ExprResult ParserImpl::ParseParenExpr(TypeResult FIXME_UNUSED) { case 2: return ParseBinaryParenExpr(Name, ExprKind, IsFixed, ResTy); case 3: - if (ExprKind == Expr::Select) + if (ExprKind == Expr::Select) { return ParseSelectParenExpr(Name, ResTy); + } else { + assert(0 && "Invalid ternary expression kind."); + } default: assert(0 && "Invalid argument kind (number of args)."); return ExprResult(); |