Disable warnings from Clang correctly, by directly

manipulating the diagnostics engine.

<rdar://problem/13508470>

llvm-svn: 178399
This commit is contained in:
Sean Callanan 2013-03-30 01:26:06 +00:00
parent 5bfcb2f0ef
commit 42f26b488b
1 changed files with 2 additions and 2 deletions

View File

@ -321,8 +321,8 @@ ClangExpressionParser::ClangExpressionParser (ExecutionContextScope *exe_scope,
m_compiler->getCodeGenOpts().InstrumentFunctions = false;
// Disable some warnings.
m_compiler->getDiagnosticOpts().Warnings.push_back("no-unused-value");
m_compiler->getDiagnosticOpts().Warnings.push_back("no-odr");
m_compiler->getDiagnostics().setDiagnosticGroupMapping("unused-value", clang::diag::MAP_IGNORE, SourceLocation());
m_compiler->getDiagnostics().setDiagnosticGroupMapping("odr", clang::diag::MAP_IGNORE, SourceLocation());
// Inform the target of the language options
//