[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:20:29 PST 2024


balazske wrote:

> Does this have any affect on other redeclarable `DeclContext`s such as class forward declarations?

In the code of `DeclContext::getPrimaryContext` it is visible that it has only effect on declarations and it depends on whether it has a definition or not (except namespace and translation unit and some ObjC things). So I think the only case when there is change compared to the previous (except namespace) is when a definition of a decl is imported, because `getPrimaryContext` will return a different object (after a definition is imported). For namespace the new lookup is added to `ASTImporter`. At translation unit there should be no problem.


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


More information about the cfe-commits mailing list