diff --git a/lib/Interpreter/Interpreter.cpp b/lib/Interpreter/Interpreter.cpp index 6b1ae720..c966d0f0 100644 --- a/lib/Interpreter/Interpreter.cpp +++ b/lib/Interpreter/Interpreter.cpp @@ -226,6 +226,17 @@ namespace cling { DiagnosticConsumer& DClient = getCI()->getDiagnosticClient(); DClient.BeginSourceFile(getCI()->getLangOpts(), &PP); + // Disable suggestions for ROOT + bool showSuggestions = + !llvm::StringRef(ClingStringify(CLING_VERSION)).startswith("ROOT"); + + // We need InterpreterCallbacks only if it is a parent Interpreter. + if (!parentInterp) { + std::unique_ptr AutoLoadCB( + new AutoloadCallback(this, showSuggestions)); + setCallbacks(std::move(AutoLoadCB)); + } + llvm::SmallVector IncrParserTransactions; if (!m_IncrParser->Initialize(IncrParserTransactions, parentInterp)) { @@ -269,16 +280,6 @@ namespace cling { } } - // Disable suggestions for ROOT - bool showSuggestions = !llvm::StringRef(ClingStringify(CLING_VERSION)).startswith("ROOT"); - - // We need InterpreterCallbacks only if it is a parent Interpreter. - if (!parentInterp) { - std::unique_ptr - AutoLoadCB(new AutoloadCallback(this, showSuggestions)); - setCallbacks(std::move(AutoLoadCB)); - } - m_IncrParser->SetTransformers(parentInterp); if (!m_LLVMContext) {