From 30cc58a5c6ffe425672fac8e15d87894bf8a5824 Mon Sep 17 00:00:00 2001 From: Axel Naumann Date: Mon, 2 Nov 2015 16:52:52 -0600 Subject: [PATCH] Reset diagnostics after parsing arguments: we shall issue an error but survive (ROOT-7619, ROOT-7614 and others). --- lib/Interpreter/CIFactory.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/Interpreter/CIFactory.cpp b/lib/Interpreter/CIFactory.cpp index ae908433..179b34df 100644 --- a/lib/Interpreter/CIFactory.cpp +++ b/lib/Interpreter/CIFactory.cpp @@ -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 CI(new CompilerInstance());