summaryrefslogtreecommitdiffstats
path: root/clang/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
commit955a067bddaae567ee48261da14c7438d613a84e (patch)
treed1301cc49c8aa81ccc08304d7dbe359b93c9c842 /clang/lib/Sema/SemaExpr.cpp
parent573720e18585e852523adb2a06cbf105b8e4320d (diff)
downloadbcm5719-llvm-955a067bddaae567ee48261da14c7438d613a84e.tar.gz
bcm5719-llvm-955a067bddaae567ee48261da14c7438d613a84e.zip
Make functional-style casts emit correct messages, and fix a crash-on-invalid.
llvm-svn: 77451
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index 473ecef8d0b..ba9d51dfb56 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/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);
OpenPOWER on IntegriCloud