Move the diagnostic client setup before parser's initialization.

This would allow us to produce diagnostics in the invocation args, such as
 -DFOO=''
Fixes ROOT-6538.
This commit is contained in:
Vassil Vassilev 2014-07-31 11:22:02 +02:00 committed by sftnight
parent ac4ab27781
commit 3d5b378afb

View File

@ -196,16 +196,15 @@ namespace cling {
}
llvm::SmallVector<Transaction*, 2> IncrParserTransactions;
// Tell the diagnostic client that we are entering file parsing mode.
DiagnosticConsumer& DClient = getCI()->getDiagnosticClient();
DClient.BeginSourceFile(getCI()->getLangOpts(), &PP);
m_IncrParser->Initialize(IncrParserTransactions);
handleFrontendOptions();
AddRuntimeIncludePaths(argv[0]);
// Tell the diagnostic client that we are entering file parsing mode.
DiagnosticConsumer& DClient = getCI()->getDiagnosticClient();
DClient.BeginSourceFile(getCI()->getLangOpts(), &PP);
if (!noRuntime) {
if (getCI()->getLangOpts().CPlusPlus)
IncludeCXXRuntime();