[llvm-branch-commits] [clang] 233479f - Revert "[Clang] Implement fix for DR2628"
Tobias Hieta via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Feb 24 00:42:59 PST 2023
Author: Tobias Hieta
Date: 2023-02-24T09:42:26+01:00
New Revision: 233479fa9b7f48d2bb253cbcf943d7887b47b39d
URL: https://github.com/llvm/llvm-project/commit/233479fa9b7f48d2bb253cbcf943d7887b47b39d
DIFF: https://github.com/llvm/llvm-project/commit/233479fa9b7f48d2bb253cbcf943d7887b47b39d.diff
LOG: Revert "[Clang] Implement fix for DR2628"
This reverts commit 368b6832de33b366d4eb155f940e7476daace6a8.
Added:
Modified:
clang/docs/ReleaseNotes.rst
clang/lib/Sema/SemaTemplate.cpp
clang/test/CXX/drs/dr26xx.cpp
Removed:
################################################################################
diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index f33c4c5375f37..5f2c92e7c452f 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -833,11 +833,6 @@ Concepts Specific Fixes:
- Fixed an issue with concept requirement evaluation, where we incorrectly allowed implicit
conversions to bool for a requirement. (`#54524 <https://github.com/llvm/llvm-project/issues/54524>`_)
-- Respect constructor constraints during class template argument deduction (CTAD).
- This is the suggested resolution to CWG DR2628.
- (`#57646 <https://github.com/llvm/llvm-project/issues/57646>`_,
- `#43829 <https://github.com/llvm/llvm-project/issues/43829>`_)
-
- Fix a crash when emitting a concept-related diagnostic.
(`#57415 <https://github.com/llvm/llvm-project/issues/57415>`_)
diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp
index b40bd0978a8ab..890cea1dfb0ed 100644
--- a/clang/lib/Sema/SemaTemplate.cpp
+++ b/clang/lib/Sema/SemaTemplate.cpp
@@ -2540,8 +2540,6 @@ struct ConvertConstructorToDeductionGuideTransform {
TInfo->getType(), TInfo, LocEnd, Ctor);
Guide->setImplicit();
Guide->setParams(Params);
- if (Ctor && Ctor->getTrailingRequiresClause())
- Guide->setTrailingRequiresClause(Ctor->getTrailingRequiresClause());
for (auto *Param : Params)
Param->setDeclContext(Guide);
diff --git a/clang/test/CXX/drs/dr26xx.cpp b/clang/test/CXX/drs/dr26xx.cpp
index 36aea39824740..e69a151b9d029 100644
--- a/clang/test/CXX/drs/dr26xx.cpp
+++ b/clang/test/CXX/drs/dr26xx.cpp
@@ -14,17 +14,23 @@ using enum E; // expected-error {{unknown type name E}}
}
}
-namespace dr2628 { // dr2628: yes open
+namespace dr2628 { // dr2628: no, this was reverted for the 16.x release
+ // due to regressions, see the issue for more details:
+ // https://github.com/llvm/llvm-project/issues/60777
template <bool A = false, bool B = false>
struct foo {
- constexpr foo() requires (!A && !B) = delete; // #DR2628_CTOR
- constexpr foo() requires (A || B) = delete;
+ // The expected notes below should be removed when dr2628 is fully implemented again
+ constexpr foo() requires (!A && !B) = delete; // expected-note {{candidate function [with A = false, B = false]}} #DR2628_CTOR
+ constexpr foo() requires (A || B) = delete; // expected-note {{candidate function [with A = false, B = false]}}
};
void f() {
- foo fooable; // expected-error {{call to deleted}}
- // expected-note@#DR2628_CTOR {{marked deleted here}}
+ // The FIXME's below should be the expected errors when dr2628 is
+ // fully implemented again.
+ // FIXME-expected-error {{call to deleted}}
+ foo fooable; // expected-error {{ambiguous deduction for template arguments of 'foo'}}
+ // FIXME-expected-note@#DR2628_CTOR {{marked deleted here}}
}
}
More information about the llvm-branch-commits
mailing list