forked from OSchip/llvm-project
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:
parent
584f2de0a3
commit
7f3654f65c
|
@ -2743,13 +2743,6 @@ void AnalyzeAssignment(Sema &S, BinaryOperator *E) {
|
||||||
AnalyzeImplicitConversions(S, E->getRHS(), E->getOperatorLoc());
|
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.
|
/// Diagnose an implicit cast; purely a helper for CheckImplicitConversion.
|
||||||
void DiagnoseImpCast(Sema &S, Expr *E, QualType SourceType, QualType T,
|
void DiagnoseImpCast(Sema &S, Expr *E, QualType SourceType, QualType T,
|
||||||
SourceLocation CContext, unsigned diag) {
|
SourceLocation CContext, unsigned diag) {
|
||||||
|
@ -2757,6 +2750,12 @@ void DiagnoseImpCast(Sema &S, Expr *E, QualType SourceType, QualType T,
|
||||||
<< SourceType << T << E->getSourceRange() << SourceRange(CContext);
|
<< 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) {
|
std::string PrettyPrintInRange(const llvm::APSInt &Value, IntRange Range) {
|
||||||
if (!Range.Width) return "0";
|
if (!Range.Width) return "0";
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue