[clang] 2ae3990 - Revert "[Modules] Don't check [temp.friend]p9 in ASTContext::isSameEntity"

Mark de Wever via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 28 10:37:47 PST 2023


Author: Mark de Wever
Date: 2023-02-28T19:36:56+01:00
New Revision: 2ae39902506f38d6368a7dbe3d64109f57ad6f99

URL: https://github.com/llvm/llvm-project/commit/2ae39902506f38d6368a7dbe3d64109f57ad6f99
DIFF: https://github.com/llvm/llvm-project/commit/2ae39902506f38d6368a7dbe3d64109f57ad6f99.diff

LOG: Revert "[Modules] Don't check [temp.friend]p9 in ASTContext::isSameEntity"

This commits breaks the libc++ modular build in the precommit CI.

This reverts commit 74565c3add6d683559618973863e78a5e6836e48.

Added: 
    

Modified: 
    clang/lib/AST/ASTContext.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index 00b339fbc2d41..b692e6ee06521 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -6707,6 +6707,10 @@ bool ASTContext::isSameEntity(const NamedDecl *X, const NamedDecl *Y) const {
                               PrimaryY->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


        


More information about the cfe-commits mailing list