Author: Tobias Hieta Date: 2023-02-23T16:07:35+01:00 New Revision: 3b6c88331bcd0531d627fe27de5dbd0ac3165300
URL: https://github.com/llvm/llvm-project/commit/3b6c88331bcd0531d627fe27de5dbd0ac3165300 DIFF: https://github.com/llvm/llvm-project/commit/3b6c88331bcd0531d627fe27de5dbd0ac3165300.diff LOG: Revert "[Clang] Implement fix for DR2628" This reverts commit 368b6832de33b366d4eb155f940e7476daace6a8. See https://github.com/llvm/llvm-project/issues/60777 for details Added: Modified: clang/lib/Sema/SemaTemplate.cpp clang/test/CXX/drs/dr26xx.cpp Removed: ################################################################################ diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp index 8df8eadad3fef..c3338e4eaed28 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}} } } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits