[clang] [C++20] [Modules] Don't set modules owner ship information for builtin declarations (PR #102115)
Chuanqi Xu via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 7 02:12:49 PDT 2024
================
@@ -2376,6 +2376,12 @@ NamedDecl *Sema::LazilyCreateBuiltin(IdentifierInfo *II, unsigned ID,
FunctionDecl *New = CreateBuiltin(II, R, ID, Loc);
RegisterLocallyScopedExternCDecl(New, S);
+ // Builtin functions shouldn't be owned by any module.
+ if (New->hasOwningModule()) {
+ New->setLocalOwningModule(nullptr);
----------------
ChuanqiXu9 wrote:
I posted https://github.com/llvm/llvm-project/issues/102290. Let's talk about this there. And I think I don't have time to do that in the near future and I feel the status quo is not really bad. So I'd like to propose to land this patch first and remove this after we make the implementation design better someday.
https://github.com/llvm/llvm-project/pull/102115
More information about the cfe-commits
mailing list