]> granicus.if.org Git - clang/commitdiff
Refactor one helper function to merely forward to another so that there
authorChandler Carruth <chandlerc@gmail.com>
Tue, 5 Apr 2011 06:47:57 +0000 (06:47 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Tue, 5 Apr 2011 06:47:57 +0000 (06:47 +0000)
is a single implementation. No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128877 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaChecking.cpp

index 15644c99d91fa46b3e3f48e98677eb0d15dfcd02..bdadf5aab81e50755a8cb617aa4f6518218b2fe7 100644 (file)
@@ -2743,13 +2743,6 @@ void AnalyzeAssignment(Sema &S, BinaryOperator *E) {
   AnalyzeImplicitConversions(S, E->getRHS(), E->getOperatorLoc());
 }
 
-/// Diagnose an implicit cast;  purely a helper for CheckImplicitConversion.
-void DiagnoseImpCast(Sema &S, Expr *E, QualType T, SourceLocation CContext,
-                     unsigned diag) {
-  S.Diag(E->getExprLoc(), diag)
-    << E->getType() << T << E->getSourceRange() << SourceRange(CContext);
-}
-
 /// Diagnose an implicit cast;  purely a helper for CheckImplicitConversion.
 void DiagnoseImpCast(Sema &S, Expr *E, QualType SourceType, QualType T, 
                      SourceLocation CContext, unsigned diag) {
@@ -2757,6 +2750,12 @@ void DiagnoseImpCast(Sema &S, Expr *E, QualType SourceType, QualType T,
     << SourceType << T << E->getSourceRange() << SourceRange(CContext);
 }
 
+/// Diagnose an implicit cast;  purely a helper for CheckImplicitConversion.
+void DiagnoseImpCast(Sema &S, Expr *E, QualType T, SourceLocation CContext,
+                     unsigned diag) {
+  DiagnoseImpCast(S, E, E->getType(), T, CContext, diag);
+}
+
 std::string PrettyPrintInRange(const llvm::APSInt &Value, IntRange Range) {
   if (!Range.Width) return "0";