do not force compiler plugin warnings to errors with -Werror, for now

Change-Id: I87585fce44e803513d5345709d9723075b9429a1
This commit is contained in:
Luboš Luňák
2012-10-09 16:28:13 +02:00
parent 4fc56b9d4c
commit 4d05099806

View File

@@ -32,12 +32,14 @@ Plugin::Plugin( ASTContext& context )
DiagnosticBuilder Plugin::report( DiagnosticsEngine::Level level, StringRef message, SourceLocation loc )
{
// Do some mappings (e.g. for -Werror) that clang does not do for custom messages for some reason.
DiagnosticsEngine& diag = context.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
return diag.Report( loc, diag.getCustomDiagID( level, message ));
}