Reset diagnostics after parsing arguments: we shall issue an error but survive (ROOT-7619, ROOT-7614 and others).

This commit is contained in:
Axel Naumann 2015-11-02 16:52:52 -06:00 committed by sftnight
parent 1d1a9c185f
commit 30cc58a5c6

View File

@ -642,9 +642,14 @@ namespace {
delete Invocation;
return 0;
}
clang::CompilerInvocation::CreateFromArgs(*Invocation, CC1Args->data() + 1,
CC1Args->data() + CC1Args->size(),
*Diags);
// We appreciate the error message about an unknown flag (or do we? if not
// we should switch to a different DiagEngine for parsing the flags).
// But in general we'll happily go on.
Diags->Reset();
// Create and setup a compiler instance.
std::unique_ptr<CompilerInstance> CI(new CompilerInstance());