summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-04-16 22:27:05 +0000
committerDouglas Gregor <dgregor@apple.com>2010-04-16 22:27:05 +0000
commitae4b5df81751edd2b0e253cf643875d570a65592 (patch)
tree28899dba9b2250af5252343da101def800abc7a5
parentf037f87bdeff21a215634102e817bd38fe286459 (diff)
downloadbcm5719-llvm-ae4b5df81751edd2b0e253cf643875d570a65592.tar.gz
bcm5719-llvm-ae4b5df81751edd2b0e253cf643875d570a65592.zip
Move Sema::PerformImplicitConversion over to where Sema::TryImplicitConversion is, for my own sanity. No functionality change
llvm-svn: 101554
-rw-r--r--clang/lib/Sema/SemaExprCXX.cpp24
-rw-r--r--clang/lib/Sema/SemaOverload.cpp24
2 files changed, 24 insertions, 24 deletions
diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp
index 1bdcc8acabe..4d85977103a 100644
--- a/clang/lib/Sema/SemaExprCXX.cpp
+++ b/clang/lib/Sema/SemaExprCXX.cpp
@@ -1463,30 +1463,6 @@ Sema::IsStringLiteralToNonConstPointerConversion(Expr *From, QualType ToType) {
return false;
}
-/// PerformImplicitConversion - Perform an implicit conversion of the
-/// expression From to the type ToType. Returns true if there was an
-/// error, false otherwise. The expression From is replaced with the
-/// converted expression. Flavor is the kind of conversion we're
-/// performing, used in the error message. If @p AllowExplicit,
-/// explicit user-defined conversions are permitted.
-bool
-Sema::PerformImplicitConversion(Expr *&From, QualType ToType,
- AssignmentAction Action, bool AllowExplicit) {
- ImplicitConversionSequence ICS;
- return PerformImplicitConversion(From, ToType, Action, AllowExplicit, ICS);
-}
-
-bool
-Sema::PerformImplicitConversion(Expr *&From, QualType ToType,
- AssignmentAction Action, bool AllowExplicit,
- ImplicitConversionSequence& ICS) {
- ICS = TryImplicitConversion(From, ToType,
- /*SuppressUserConversions=*/false,
- AllowExplicit,
- /*InOverloadResolution=*/false);
- return PerformImplicitConversion(From, ToType, ICS, Action);
-}
-
static Sema::OwningExprResult BuildCXXCastArgument(Sema &S,
SourceLocation CastLoc,
QualType Ty,
diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp
index ca8d13517eb..3d1fa434dca 100644
--- a/clang/lib/Sema/SemaOverload.cpp
+++ b/clang/lib/Sema/SemaOverload.cpp
@@ -514,6 +514,30 @@ Sema::TryImplicitConversion(Expr* From, QualType ToType,
return ICS;
}
+/// PerformImplicitConversion - Perform an implicit conversion of the
+/// expression From to the type ToType. Returns true if there was an
+/// error, false otherwise. The expression From is replaced with the
+/// converted expression. Flavor is the kind of conversion we're
+/// performing, used in the error message. If @p AllowExplicit,
+/// explicit user-defined conversions are permitted.
+bool
+Sema::PerformImplicitConversion(Expr *&From, QualType ToType,
+ AssignmentAction Action, bool AllowExplicit) {
+ ImplicitConversionSequence ICS;
+ return PerformImplicitConversion(From, ToType, Action, AllowExplicit, ICS);
+}
+
+bool
+Sema::PerformImplicitConversion(Expr *&From, QualType ToType,
+ AssignmentAction Action, bool AllowExplicit,
+ ImplicitConversionSequence& ICS) {
+ ICS = TryImplicitConversion(From, ToType,
+ /*SuppressUserConversions=*/false,
+ AllowExplicit,
+ /*InOverloadResolution=*/false);
+ return PerformImplicitConversion(From, ToType, ICS, Action);
+}
+
/// \brief Determine whether the conversion from FromType to ToType is a valid
/// conversion that strips "noreturn" off the nested function type.
static bool IsNoReturnConversion(ASTContext &Context, QualType FromType,
OpenPOWER on IntegriCloud