diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2013-02-02 19:31:24 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2013-02-02 22:59:45 +0100 |
commit | b4392c575e5aaf31ccf0813a20450187df37cf59 (patch) | |
tree | d4ff38959cfbca91ba1c8bcef3b8280cab860c58 /compilerplugins/clang/plugin.cxx | |
parent | efe9bf61ed408e94a9171992c1582e00f21d209e (diff) |
always use the report() helper
Change-Id: I2966fdb5bd98b1ddf718079584acf90a3e3a3700
Diffstat (limited to 'compilerplugins/clang/plugin.cxx')
-rw-r--r-- | compilerplugins/clang/plugin.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/compilerplugins/clang/plugin.cxx b/compilerplugins/clang/plugin.cxx index 01b2894dfcab..799fbabdbf22 100644 --- a/compilerplugins/clang/plugin.cxx +++ b/compilerplugins/clang/plugin.cxx @@ -28,6 +28,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 // Do some mappings (e.g. for -Werror) that clang does not do for custom messages for some reason. @@ -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; } |