================ @@ -1571,9 +1571,10 @@ void ASTDeclWriter::VisitCXXRecordDecl(CXXRecordDecl *D) { } else { Record.push_back(0); } - // For lambdas inside canonical FunctionDecl remember the mapping. + // For lambdas inside template functions, remember the mapping to + // deserialize them together. if (auto FD = llvm::dyn_cast_or_null<FunctionDecl>(D->getDeclContext()); - FD && FD->isCanonicalDecl()) { + FD && FD->isDependentContext() && FD->isThisDeclarationADefinition()) { ---------------- dmpolukhin wrote:
But types are different and `isThisDeclarationADefinition` is not a virtual function. Moreover I'm not sure that conditions will be the same in future so extracting them to a function might be a wrong hint. https://github.com/llvm/llvm-project/pull/123648 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits