[clang] 575e297 - Revert "[clang-repl] Recover the lookup tables of the primary context."

Vassil Vassilev via cfe-commits cfe-commits at lists.llvm.org
Mon May 30 23:33:18 PDT 2022


Author: Vassil Vassilev
Date: 2022-05-31T06:25:37Z
New Revision: 575e297fcb289f0a9b0ac4b01d1d0fa051f5cc29

URL: https://github.com/llvm/llvm-project/commit/575e297fcb289f0a9b0ac4b01d1d0fa051f5cc29
DIFF: https://github.com/llvm/llvm-project/commit/575e297fcb289f0a9b0ac4b01d1d0fa051f5cc29.diff

LOG: Revert "[clang-repl] Recover the lookup tables of the primary context."

This reverts commit 5ff27fe1ff03d5aeaf8567c97618170f0cef8f58.

This patch caused failures in asan: https://lab.llvm.org/buildbot/#/builders/5/builds/24221

Added: 
    

Modified: 
    clang/lib/Interpreter/IncrementalParser.cpp
    clang/test/Interpreter/execute.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Interpreter/IncrementalParser.cpp b/clang/lib/Interpreter/IncrementalParser.cpp
index 87687ea6906d..0f1ef3233a2a 100644
--- a/clang/lib/Interpreter/IncrementalParser.cpp
+++ b/clang/lib/Interpreter/IncrementalParser.cpp
@@ -188,7 +188,7 @@ IncrementalParser::ParseOrWrapTopLevelDecl() {
     S.TUScope->setEntity(PreviousTU);
 
     // Clean up the lookup table
-    if (StoredDeclsMap *Map = PreviousTU->getPrimaryContext()->getLookupPtr()) {
+    if (StoredDeclsMap *Map = PreviousTU->getLookupPtr()) {
       for (auto I = Map->begin(); I != Map->end(); ++I) {
         StoredDeclsList &List = I->second;
         DeclContextLookupResult R = List.getLookupResult();

diff  --git a/clang/test/Interpreter/execute.cpp b/clang/test/Interpreter/execute.cpp
index 5f3fe3e837d9..298046c068c3 100644
--- a/clang/test/Interpreter/execute.cpp
+++ b/clang/test/Interpreter/execute.cpp
@@ -1,4 +1,3 @@
-// RUN: clang-repl "int x = 10;" "int y=7; err;" "int y = 10;"
 // RUN: clang-repl "int i = 10;" 'extern "C" int printf(const char*,...);' \
 // RUN:            'auto r1 = printf("i = %d\n", i);' | FileCheck --check-prefix=CHECK-DRIVER %s
 // REQUIRES: host-supports-jit


        


More information about the cfe-commits mailing list