[clang] [RFC][clang] Handle friend function that was a definition but became only a declaration during AST deserialization (PR #132214)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 26 15:05:22 PDT 2025
================
@@ -2572,7 +2572,7 @@ Decl *TemplateDeclInstantiator::VisitFunctionDecl(
// Friend function defined withing class template may stop being function
// definition during AST merges from different modules, in this case decl
// with function body should be used for instantiation.
- if (isFriend) {
+ if (isFriend && D->hasOwningModule()) {
----------------
cor3ntin wrote:
we can add bits by shrinking
NumCtorInitializers.
however, in the present case it doesn't seem justified. these bits are precious.
https://github.com/llvm/llvm-project/pull/132214
More information about the cfe-commits
mailing list