diff --git a/lib/Interpreter/InterpreterCallbacks.cpp b/lib/Interpreter/InterpreterCallbacks.cpp index 6768192c..56a04229 100644 --- a/lib/Interpreter/InterpreterCallbacks.cpp +++ b/lib/Interpreter/InterpreterCallbacks.cpp @@ -182,7 +182,7 @@ namespace cling { // Disable the ROOT external sema source when we have modules. In the // modules case the module manager is taking it's place and we don't want // to overwrite it. - if (!getenv("ROOT_MODULES") && enableExternalSemaSourceCallbacks) + if (!SemaRef.getLangOpts().Modules && enableExternalSemaSourceCallbacks) if (!externalSemaSrc || externalSemaSrc == Reader) { // If the ExternalSemaSource is the PCH reader we still need to insert // our listener.