always use the report() helper

Change-Id: I2966fdb5bd98b1ddf718079584acf90a3e3a3700
This commit is contained in:
Luboš Luňák
2013-02-02 19:31:24 +01:00
parent efe9bf61ed
commit b4392c575e
5 changed files with 30 additions and 29 deletions

View File

@@ -119,10 +119,8 @@ bool PostfixIncrementFix::canChangePostfixToPrefix( const CXXOperatorCallExpr* o
return canChangeInConditionStatement( op, dyn_cast< ForStmt >( parents[ parent_pos ] )->getCond(),
parents, parent_pos );
default:
DiagnosticsEngine& diag = context.getDiagnostics();
unsigned diagid = diag.getCustomDiagID( DiagnosticsEngine::Fatal,
"cannot analyze operator++ (plugin needs fixing) [loplugin]" );
diag.Report( op->getLocStart(), diagid ) << parents[ parent_pos ]->getSourceRange();
report( DiagnosticsEngine::Fatal, "cannot analyze operator++ (plugin needs fixing) [loplugin]",
op->getLocStart()) << parents[ parent_pos ]->getSourceRange();
// parents[ parent_pos ]->dump();
// parents[ std::max( parent_pos - 3, 0 ) ]->dump();
return false;
@@ -157,10 +155,8 @@ bool PostfixIncrementFix::shouldDoChange( const Expr* operand )
return true;
default:
{
DiagnosticsEngine& diag = context.getDiagnostics();
unsigned diagid = diag.getCustomDiagID( DiagnosticsEngine::Fatal,
"cannot analyze operator++ (plugin needs fixing) [loplugin]" );
diag.Report( expr->getLocStart(), diagid ) << operand->getSourceRange();
report( DiagnosticsEngine::Fatal, "cannot analyze operator++ (plugin needs fixing) [loplugin]",
expr->getLocStart()) << operand->getSourceRange();
expr->dump();
operand->dump();
return false;