================
@@ -2101,6 +2102,17 @@ class DeclContext {
/// another pointer.
mutable Decl *LastDecl = nullptr;
+ /// A primary context whose identity cannot change. Incomplete C++ records
+ /// and contexts with mutable primary identities remain uncached.
+ /// Relaxed atomics permit cache population during concurrent read-only AST
+ /// traversal; they do not synchronize mutations to the AST itself.
+ mutable std::atomic<DeclContext *> CachedPrimaryContext = nullptr;
----------------
zwuis wrote:
Do/Should we support concurrent traversal?
https://github.com/llvm/llvm-project/pull/223047
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits