[clang] db1b827 - Revert "[Modules] Don't check [temp.friend]p9 in ASTContext::isSameEntity"
Chuanqi Xu via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 28 19:23:14 PST 2023
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
More information about the cfe-commits
mailing list