diff options
author | Sebastian Redl <sebastian.redl@getdesigned.at> | 2011-10-16 18:19:06 +0000 |
---|---|---|
committer | Sebastian Redl <sebastian.redl@getdesigned.at> | 2011-10-16 18:19:06 +0000 |
commit | 091fffeed8971a577bc3c8057c1ec40015a22775 (patch) | |
tree | 961cda07a58eddad6bb1a8055fdd3aa67b1da8b5 /lib/Sema/SemaOverload.cpp | |
parent | 68ff8d627e19f37601e28f5218212ca715bac842 (diff) |
Drop the Diagnose parameter from Sema::PerformImplicitConversion again and instead use TryImplicitConversion in CheckSingleAssignmentConstraints when that function is in no-diagnostics mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142143 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaOverload.cpp')
-rw-r--r-- | lib/Sema/SemaOverload.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp index b0dd5e280e..440c2d1edd 100644 --- a/lib/Sema/SemaOverload.cpp +++ b/lib/Sema/SemaOverload.cpp @@ -912,18 +912,15 @@ Sema::TryImplicitConversion(Expr *From, QualType ToType, /// explicit user-defined conversions are permitted. ExprResult Sema::PerformImplicitConversion(Expr *From, QualType ToType, - AssignmentAction Action, bool AllowExplicit, - bool Diagnose) { + AssignmentAction Action, bool AllowExplicit) { ImplicitConversionSequence ICS; - return PerformImplicitConversion(From, ToType, Action, AllowExplicit, ICS, - Diagnose); + return PerformImplicitConversion(From, ToType, Action, AllowExplicit, ICS); } ExprResult Sema::PerformImplicitConversion(Expr *From, QualType ToType, AssignmentAction Action, bool AllowExplicit, - ImplicitConversionSequence& ICS, - bool Diagnose) { + ImplicitConversionSequence& ICS) { // Objective-C ARC: Determine whether we will allow the writeback conversion. bool AllowObjCWritebackConversion = getLangOptions().ObjCAutoRefCount && @@ -935,8 +932,6 @@ Sema::PerformImplicitConversion(Expr *From, QualType ToType, /*InOverloadResolution=*/false, /*CStyle=*/false, AllowObjCWritebackConversion); - if (!Diagnose && ICS.isFailure()) - return ExprError(); return PerformImplicitConversion(From, ToType, ICS, Action); } |