[clang] [clang-repl] fix CleanUpPTU by removing decl according to C implicitly FuncitonDecl. (PR #178648)
Yanzuo Liu via cfe-commits
cfe-commits at lists.llvm.org
Sat Feb 28 07:30:50 PST 2026
================
@@ -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;
----------------
zwuis wrote:
Use `SmallVector`.
https://llvm.org/docs/CodingStandards.html#c-standard-library
https://github.com/llvm/llvm-project/pull/178648
More information about the cfe-commits
mailing list