[all-commits] [llvm/llvm-project] b27052: [clang][ASTImporter] Not using primary context in ...
Balázs Kéri via All-commits
all-commits at lists.llvm.org
Mon Jan 13 00:47:06 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b270525f730be6e7196667925f5a9bfa153262e9
https://github.com/llvm/llvm-project/commit/b270525f730be6e7196667925f5a9bfa153262e9
Author: Balázs Kéri <balazs.keri at ericsson.com>
Date: 2025-01-13 (Mon, 13 Jan 2025)
Changed paths:
M clang/lib/AST/ASTImporter.cpp
M clang/lib/AST/ASTImporterLookupTable.cpp
M clang/unittests/AST/ASTImporterTest.cpp
Log Message:
-----------
[clang][ASTImporter] Not using primary context in lookup table (#118466)
`ASTImporterLookupTable` did use the `getPrimaryContext` function to get
the declaration context of the inserted items. This is problematic
because the primary context can change during import of AST items, most
likely if a definition of a previously not defined class is imported.
(For any record the primary context is the definition if there is one.)
The use of primary context is really not important, only for namespaces
because these can be re-opened and lookup in one namespace block is not
enough. This special search is now moved into ASTImporter instead of
relying on the lookup table.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list