Make functional-style casts emit correct messages, and fix a crash-on-invalid.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77451 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp
index 144dc50..a05c762 100644
--- a/lib/Sema/SemaExprCXX.cpp
+++ b/lib/Sema/SemaExprCXX.cpp
@@ -203,7 +203,7 @@
// corresponding cast expression.
//
if (NumExprs == 1) {
- if (CheckCastTypes(TypeRange, Ty, Exprs[0]))
+ if (CheckCastTypes(TypeRange, Ty, Exprs[0], /*functional-style*/true))
return ExprError();
exprs.release();
return Owned(new (Context) CXXFunctionalCastExpr(Ty.getNonReferenceType(),