Author: Chuanqi Xu Date: 2023-03-01T11:19:10+08:00 New Revision: db1b827ecfed6d311c315484f8a0bd78d4e9f99a
URL: https://github.com/llvm/llvm-project/commit/db1b827ecfed6d311c315484f8a0bd78d4e9f99a DIFF: https://github.com/llvm/llvm-project/commit/db1b827ecfed6d311c315484f8a0bd78d4e9f99a.diff LOG: Revert "[Modules] Don't check [temp.friend]p9 in ASTContext::isSameEntity" This reverts commit 74565c3add6d683559618973863e78a5e6836e48. Since it looks like this one causes the modular libcxx build fails. Added: Modified: clang/lib/AST/ASTContext.cpp Removed: ################################################################################ diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index 4182986aa13a8..482791ada5d1a 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -6687,6 +6687,10 @@ bool ASTContext::isSameEntity(const NamedDecl *X, const NamedDecl *Y) const { FuncY->getTrailingRequiresClause())) return false; + // Constrained friends are diff erent in certain cases, see: [temp.friend]p9. + if (FriendsDifferByConstraints(FuncX, FuncY)) + return false; + auto GetTypeAsWritten = [](const FunctionDecl *FD) { // Map to the first declaration that we've already merged into this one. // The TSI of redeclarations might not match (due to calling conventions _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits