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:
parent
ac4ab27781
commit
3d5b378afb
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user