Manually initialize the module manager before callbacks.
Initializing the module manager overwrites the external Sema/AST sources with the ASTReader. As we are using our own sources in cling, we should manually initalize the module manager when we are in the module mode before we set our own custom sources (which respect any existing sources like the ones created by the module manager).
This commit is contained in:
parent
1ebf53715c
commit
e20f8edbec
@ -226,6 +226,12 @@ namespace cling {
|
|||||||
DiagnosticConsumer& DClient = getCI()->getDiagnosticClient();
|
DiagnosticConsumer& DClient = getCI()->getDiagnosticClient();
|
||||||
DClient.BeginSourceFile(getCI()->getLangOpts(), &PP);
|
DClient.BeginSourceFile(getCI()->getLangOpts(), &PP);
|
||||||
|
|
||||||
|
if (m_IncrParser->getCI()->getLangOpts().Modules) {
|
||||||
|
// Explicitly create the modulemanager now. If we would create it later
|
||||||
|
// implicitly then it would just overwrite our callbacks we set below.
|
||||||
|
m_IncrParser->getCI()->createModuleManager();
|
||||||
|
}
|
||||||
|
|
||||||
// Disable suggestions for ROOT
|
// Disable suggestions for ROOT
|
||||||
bool showSuggestions =
|
bool showSuggestions =
|
||||||
!llvm::StringRef(ClingStringify(CLING_VERSION)).startswith("ROOT");
|
!llvm::StringRef(ClingStringify(CLING_VERSION)).startswith("ROOT");
|
||||||
|
Loading…
Reference in New Issue
Block a user