make compiler plugin warnings follow WaE

Change-Id: I72f1a11ce86d66e773e66116c725310df77fce39
This commit is contained in:
Luboš Luňák 2013-05-31 19:18:34 +02:00
parent c4cca49f49
commit 6d114cda2c

View file

@ -34,13 +34,11 @@ DiagnosticBuilder Plugin::report( DiagnosticsEngine::Level level, StringRef mess
SourceLocation loc )
{
DiagnosticsEngine& diag = compiler.getDiagnostics();
#if 0
// Do some mappings (e.g. for -Werror) that clang does not do for custom messages for some reason.
if( level == DiagnosticsEngine::Warning && diag.getWarningsAsErrors())
level = DiagnosticsEngine::Error;
if( level == DiagnosticsEngine::Error && diag.getErrorsAsFatal())
level = DiagnosticsEngine::Fatal;
#endif
string fullMessage = ( message + " [loplugin]" ).str();
if( loc.isValid())
return diag.Report( loc, diag.getCustomDiagID( level, fullMessage ));