================
@@ -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:
@ChuanqiXu9 sorry I'm not sure I fully understand your idea about
ExternalASTSource. Are you suggesting to extend `ASTReader::DefinitionSource`
to also keep this information there? Now `ASTReader::DefinitionSource` maps to
`bool` but I can change value to a struct with two flags (previous
DefinitionSource and ThisDeclarationWasADefinition), I think we don't need to
store it in PCM file. Does it sound like the right approach?
https://github.com/llvm/llvm-project/pull/132214
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits