[cfe-commits] r101554 - in /cfe/trunk/lib/Sema: SemaExprCXX.cpp SemaOverload.cpp

Douglas Gregor dgregor at apple.com
Fri Apr 16 15:27:06 PDT 2010


Author: dgregor
Date: Fri Apr 16 17:27:05 2010
New Revision: 101554

URL: http://llvm.org/viewvc/llvm-project?rev=101554&view=rev
Log:
Move Sema::PerformImplicitConversion over to where Sema::TryImplicitConversion is, for my own sanity. No functionality change

Modified:
    cfe/trunk/lib/Sema/SemaExprCXX.cpp
    cfe/trunk/lib/Sema/SemaOverload.cpp

Modified: cfe/trunk/lib/Sema/SemaExprCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprCXX.cpp?rev=101554&r1=101553&r2=101554&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExprCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExprCXX.cpp Fri Apr 16 17:27:05 2010
@@ -1463,30 +1463,6 @@
   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,

Modified: cfe/trunk/lib/Sema/SemaOverload.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaOverload.cpp?rev=101554&r1=101553&r2=101554&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaOverload.cpp (original)
+++ cfe/trunk/lib/Sema/SemaOverload.cpp Fri Apr 16 17:27:05 2010
@@ -514,6 +514,30 @@
   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, 





More information about the cfe-commits mailing list