From: Mark de Wever Date: Tue, 28 Feb 2023 19:03:54 +0000 (+0100) Subject: Revert "Revert "[Modules] Don't check [temp.friend]p9 in ASTContext::isSameEntity"" X-Git-Tag: upstream/17.0.6~16253 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=33e18cb6ce7a478d3c381c1c7ef2501787fed6f4;p=platform%2Fupstream%2Fllvm.git Revert "Revert "[Modules] Don't check [temp.friend]p9 in ASTContext::isSameEntity"" This fixes the Clang modular CI, but breaks other CIs. This reverts commit 2ae39902506f38d6368a7dbe3d64109f57ad6f99. --- diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index b692e6e..00b339f 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -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