================
@@ -182,6 +183,30 @@ void IncrementalParser::CleanUpPTU(TranslationUnitDecl
*MostRecentTU) {
}
}
+ auto *ECCD = S.getASTContext().getExternCContextDecl();
+ if (auto *Map = ECCD->getPrimaryContext()->getLookupPtr()) {
+ for (auto &&[Key, List] : *Map) {
+ DeclContextLookupResult R = List.getLookupResult();
+ std::vector<NamedDecl *> NamedDeclsToRemove;
+ for (NamedDecl *D : R) {
+ // Implicitly generated C decl is not attached to the current TU but
+ // lexically attached to the recent TU, so we need to check the lexical
+ // context.
----------------
vgvassilev wrote:
Can you point me to the code where the declaration is being added in the
`ExternCContext` context?
https://github.com/llvm/llvm-project/pull/178648
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits