summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaOverload.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-08-27 17:24:15 +0000
committerAnders Carlsson <andersca@mac.com>2009-08-27 17:24:15 +0000
commitef4c72135f8ec1ba93beeb0e7d4a6dbcc8ce1fb5 (patch)
treedfcb89ed6a83e80d4db69c4709084ce958f9eb74 /clang/lib/Sema/SemaOverload.cpp
parentf871945c3965d89df3447cf4dd35eee366142b31 (diff)
downloadbcm5719-llvm-ef4c72135f8ec1ba93beeb0e7d4a6dbcc8ce1fb5.tar.gz
bcm5719-llvm-ef4c72135f8ec1ba93beeb0e7d4a6dbcc8ce1fb5.zip
Remove default arguments from TryImplicitConversion and fix a bug found in the process.
llvm-svn: 80258
Diffstat (limited to 'clang/lib/Sema/SemaOverload.cpp')
-rw-r--r--clang/lib/Sema/SemaOverload.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp
index 52010ab5145..b1364a9faab 100644
--- a/clang/lib/Sema/SemaOverload.cpp
+++ b/clang/lib/Sema/SemaOverload.cpp
@@ -1929,7 +1929,9 @@ Sema::TryCopyInitialization(Expr *From, QualType ToType,
/*AllowExplicit=*/false, ForceRValue);
return ICS;
} else {
- return TryImplicitConversion(From, ToType, SuppressUserConversions,
+ return TryImplicitConversion(From, ToType,
+ SuppressUserConversions,
+ /*AllowExplicit=*/false,
ForceRValue);
}
}
@@ -2064,7 +2066,11 @@ Sema::PerformObjectArgumentInitialization(Expr *&From, CXXMethodDecl *Method) {
/// TryContextuallyConvertToBool - Attempt to contextually convert the
/// expression From to bool (C++0x [conv]p3).
ImplicitConversionSequence Sema::TryContextuallyConvertToBool(Expr *From) {
- return TryImplicitConversion(From, Context.BoolTy, false, true);
+ return TryImplicitConversion(From, Context.BoolTy,
+ // FIXME: Are these flags correct?
+ /*SuppressUserConversions=*/false,
+ /*AllowExplicit=*/true,
+ /*ForceRValue=*/false);
}
/// PerformContextuallyConvertToBool - Perform a contextual conversion
OpenPOWER on IntegriCloud