Revert "Revert "[Modules] Don't check [temp.friend]p9 in ASTContext::isSameEntity""
authorMark de Wever <koraq@xs4all.nl>
Tue, 28 Feb 2023 19:03:54 +0000 (20:03 +0100)
committerMark de Wever <koraq@xs4all.nl>
Tue, 28 Feb 2023 19:03:54 +0000 (20:03 +0100)
This fixes the Clang modular CI, but breaks other CIs.

This reverts commit 2ae39902506f38d6368a7dbe3d64109f57ad6f99.

clang/lib/AST/ASTContext.cpp

index b692e6e..00b339f 100644 (file)
@@ -6707,10 +6707,6 @@ bool ASTContext::isSameEntity(const NamedDecl *X, const NamedDecl *Y) const {
                               PrimaryY->getTrailingRequiresClause()))
       return false;
 
-    // Constrained friends are different 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