diff --git a/interpreter/cling/lib/Interpreter/Interpreter.cpp b/interpreter/cling/lib/Interpreter/Interpreter.cpp
index 4529a1d6b38310f27e37357b21c91870d1555a88..9fef619df090cbb15234075a96b1633aa1907820 100644
--- a/interpreter/cling/lib/Interpreter/Interpreter.cpp
+++ b/interpreter/cling/lib/Interpreter/Interpreter.cpp
@@ -888,11 +888,9 @@ namespace cling {
     IdentifierInfo* II = PP.getIdentifierInfo(M->Name);
     SourceLocation ValidLoc = getNextAvailableLoc();
     Interpreter::PushTransactionRAII RAII(this);
-    bool success = !getCI()
-                        ->getSema()
-                        .ActOnModuleImport(ValidLoc, ValidLoc,
-                                           std::make_pair(II, ValidLoc))
-                        .isInvalid();
+    bool success =
+       !getSema().ActOnModuleImport(ValidLoc, ValidLoc,
+                                    std::make_pair(II, ValidLoc)).isInvalid();
 
     if (success) {
       // Also make the module visible in the preprocessor to export its macros.