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

@@ -27,6 +27,12 @@ Plugin::Plugin( ASTContext& context )
}
DiagnosticBuilder Plugin::report( DiagnosticsEngine::Level level, StringRef message, SourceLocation loc )
{
return report( level, message, context, loc );
}
DiagnosticBuilder Plugin::report( DiagnosticsEngine::Level level, StringRef message, ASTContext& context,
SourceLocation loc )
{
DiagnosticsEngine& diag = context.getDiagnostics();
#if 0
@@ -168,9 +174,7 @@ bool RewritePlugin::replaceText( SourceRange range, SourceRange replacementRange
bool RewritePlugin::reportEditFailure( SourceLocation loc )
{
DiagnosticsEngine& diag = context.getDiagnostics();
diag.Report( loc, diag.getCustomDiagID( DiagnosticsEngine::Warning,
"cannot perform source modification (macro expansion involved?) [loplugin]" ));
report( DiagnosticsEngine::Warning, "cannot perform source modification (macro expansion involved?) [loplugin]", loc );
return false;
}