aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorSebastian Redl <sebastian.redl@getdesigned.at>2009-07-29 13:50:23 +0000
committerSebastian Redl <sebastian.redl@getdesigned.at>2009-07-29 13:50:23 +0000
commitef0cb8e62d090ad88a01ca9fa89e48d7416f0ac7 (patch)
tree58b7e8f12a33c784db0cf35a0f810f546d768b92 /lib/Sema/SemaExpr.cpp
parentd9b401c0856fb2194855e8ee5f80908b91b598c4 (diff)
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
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r--lib/Sema/SemaExpr.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index 473ecef8d0..ba9d51dfb5 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -2918,9 +2918,10 @@ Sema::ActOnInitList(SourceLocation LBraceLoc, MultiExprArg initlist,
}
/// CheckCastTypes - Check type constraints for casting between types.
-bool Sema::CheckCastTypes(SourceRange TyR, QualType castType, Expr *&castExpr) {
+bool Sema::CheckCastTypes(SourceRange TyR, QualType castType, Expr *&castExpr,
+ bool FunctionalStyle) {
if (getLangOptions().CPlusPlus)
- return CXXCheckCStyleCast(TyR, castType, castExpr);
+ return CXXCheckCStyleCast(TyR, castType, castExpr, FunctionalStyle);
UsualUnaryConversions(castExpr);