================
@@ -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()) {
----------------
dmpolukhin wrote:
I would prefer ExternalASTSource approach because it won't add any additional
memory overhead and we already have hashtable ASTReader::DefinitionSource.
Access to the filed should be super cold so it won't slowdown things. I will
update this PR soon.
https://github.com/llvm/llvm-project/pull/132214
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits