[clang] [clang][ASTImporter] Not using primary context in lookup table (PR #118466)

Balázs Kéri via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 18 07:45:21 PST 2024


================
@@ -6082,6 +6084,7 @@ TEST_P(ASTImporterLookupTableTest, LookupSearchesInTheWholeRedeclChain) {
   auto Res = LT.lookup(N1, Name);
   ASSERT_EQ(Res.size(), 1u);
   EXPECT_EQ(*Res.begin(), A);
+  EXPECT_TRUE(LT.lookup(N2, Name).empty());
----------------
balazske wrote:

Yes, previously always the primary context was used.
(It is possible to use the primary context in the lookup table only for namespaces, not for other decls. But this exception makes the lookup table more complicated.)

https://github.com/llvm/llvm-project/pull/118466


More information about the cfe-commits mailing list