From: Chandler Carruth Date: Tue, 5 Apr 2011 06:47:57 +0000 (+0000) Subject: Refactor one helper function to merely forward to another so that there X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e1b02e00d851389415a5b7a1398de26c382887c6;p=clang Refactor one helper function to merely forward to another so that there 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 --- diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp index 15644c99d9..bdadf5aab8 100644 --- a/lib/Sema/SemaChecking.cpp +++ b/lib/Sema/SemaChecking.cpp @@ -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";