Refactor one helper function to merely forward to another so that there

is a single implementation. No functionality change intended.

llvm-svn: 128877
This commit is contained in:
Chandler Carruth 2011-04-05 06:47:57 +00:00
parent 584f2de0a3
commit 7f3654f65c
1 changed files with 6 additions and 7 deletions

View 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";