[clang] Revert "[Clang] Profile singly-resolved UnresolvedLookupExpr with the declaration" (PR #140655)
Younan Zhang via cfe-commits
cfe-commits at lists.llvm.org
Mon May 19 18:59:06 PDT 2025
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/140655
This introduced a bug where noexcept specifiers are involved, as reported in https://github.com/llvm/llvm-project/pull/140029#issuecomment-2892259764
Addressing that doesn't seem trivial at the moment, so I'll need some time to think it over; in the meantime let's
revert the offending patch.
Reverts llvm/llvm-project#140029
>From 2cea17b0ecf4d0938d19765752f4503e148af499 Mon Sep 17 00:00:00 2001
From: Younan Zhang <zyn7109 at gmail.com>
Date: Tue, 20 May 2025 09:55:50 +0800
Subject: [PATCH] =?UTF-8?q?Revert=20"[Clang]=20Profile=20singly-resolved?=
=?UTF-8?q?=20UnresolvedLookupExpr=20with=20the=20declara=E2=80=A6"?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This reverts commit 858649ad0e2bd4c24d4e577094707a53acfe6ade.
---
clang/docs/ReleaseNotes.rst | 1 -
clang/lib/AST/StmtProfile.cpp | 5 +----
.../SemaTemplate/concepts-out-of-line-def.cpp | 15 ---------------
3 files changed, 1 insertion(+), 20 deletions(-)
diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index ac9baf229b489..d756f7a3a3f70 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -741,7 +741,6 @@ Bug Fixes to C++ Support
- Fixed the handling of pack indexing types in the constraints of a member function redeclaration. (#GH138255)
- Clang now correctly parses arbitrary order of ``[[]]``, ``__attribute__`` and ``alignas`` attributes for declarations (#GH133107)
- Fixed a crash when forming an invalid function type in a dependent context. (#GH138657) (#GH115725) (#GH68852)
-- Fixed a function declaration mismatch that caused inconsistencies between concepts and variable template declarations. (#GH139476)
- Clang no longer segfaults when there is a configuration mismatch between modules and their users (http://crbug.com/400353616).
- Fix an incorrect deduction when calling an explicit object member function template through an overload set address.
- Fixed bug in constant evaluation that would allow using the value of a
diff --git a/clang/lib/AST/StmtProfile.cpp b/clang/lib/AST/StmtProfile.cpp
index 19db338f760ba..f7d1655f67ed1 100644
--- a/clang/lib/AST/StmtProfile.cpp
+++ b/clang/lib/AST/StmtProfile.cpp
@@ -2189,10 +2189,7 @@ StmtProfiler::VisitCXXPseudoDestructorExpr(const CXXPseudoDestructorExpr *S) {
void StmtProfiler::VisitOverloadExpr(const OverloadExpr *S) {
VisitExpr(S);
- if (S->getNumDecls() == 1)
- VisitDecl(*S->decls_begin());
- else
- VisitNestedNameSpecifier(S->getQualifier());
+ VisitNestedNameSpecifier(S->getQualifier());
VisitName(S->getName(), /*TreatAsDecl*/ true);
ID.AddBoolean(S->hasExplicitTemplateArgs());
if (S->hasExplicitTemplateArgs())
diff --git a/clang/test/SemaTemplate/concepts-out-of-line-def.cpp b/clang/test/SemaTemplate/concepts-out-of-line-def.cpp
index bf505dec0ca14..e5d00491d3fb8 100644
--- a/clang/test/SemaTemplate/concepts-out-of-line-def.cpp
+++ b/clang/test/SemaTemplate/concepts-out-of-line-def.cpp
@@ -853,18 +853,3 @@ template <int... Ts>
requires C<Ts...[0]>
auto TplClass<int>::buggy() -> void {}
}
-
-namespace GH139476 {
-
-namespace moo {
- template <typename T>
- constexpr bool baa = true;
-
- template <typename T> requires baa<T>
- void caw();
-}
-
-template <typename T> requires moo::baa<T>
-void moo::caw() {}
-
-}
More information about the cfe-commits
mailing list