[clang] [clang] Implement CWG2815 (PR #132778)

2025-04-05 Thread Yanzuo Liu via cfe-commits
@@ -47,6 +47,28 @@ void f() { #endif } // namespace cwg2813 +namespace cwg2815 { // cwg2815: 21 +#if __cpp_noexcept_function_type >= 201510 zwuis wrote: I'm not sure if checking values of feature test macros is better then checking the value of `__cplusplus`

[clang] [clang] Implement CWG2815 (PR #132778)

2025-04-05 Thread Vlad Serebrennikov via cfe-commits
@@ -47,6 +47,28 @@ void f() { #endif } // namespace cwg2813 +namespace cwg2815 { // cwg2815: 21 +#if __cpp_noexcept_function_type >= 201510 Endilll wrote: Yes, C++ DR tests are concerned with language modes, and not individual features. https://github.com/l

[clang] [clang] Implement CWG2815 (PR #132778)

2025-04-02 Thread via cfe-commits
https://github.com/offsetof updated https://github.com/llvm/llvm-project/pull/132778 >From 0aa1e7b83888bde7112327fba7db9bdcb71c43d9 Mon Sep 17 00:00:00 2001 From: offsetof Date: Mon, 24 Mar 2025 16:28:28 + Subject: [PATCH 1/4] [clang] Implement CWG2815 CWG2815 "Overload resolution for refe

[clang] [clang] Implement CWG2815 (PR #132778)

2025-03-26 Thread Younan Zhang via cfe-commits
@@ -5229,10 +5229,23 @@ TryReferenceInit(Sema &S, Expr *Init, QualType DeclType, S.CompareReferenceRelationship(DeclLoc, T1, T2, &RefConv); auto SetAsReferenceBinding = [&](bool BindsDirectly) { +// C++2c [over.ics.ref] p1: zyn0217 wrote: This doe

[clang] [clang] Implement CWG2815 (PR #132778)

2025-03-25 Thread via cfe-commits
@@ -5229,10 +5229,23 @@ TryReferenceInit(Sema &S, Expr *Init, QualType DeclType, S.CompareReferenceRelationship(DeclLoc, T1, T2, &RefConv); auto SetAsReferenceBinding = [&](bool BindsDirectly) { +// C++2c [over.ics.ref] p1: cor3ntin wrote: Maybe

[clang] [clang] Implement CWG2815 (PR #132778)

2025-03-25 Thread via cfe-commits
https://github.com/offsetof updated https://github.com/llvm/llvm-project/pull/132778 >From 0aa1e7b83888bde7112327fba7db9bdcb71c43d9 Mon Sep 17 00:00:00 2001 From: offsetof Date: Mon, 24 Mar 2025 16:28:28 + Subject: [PATCH 1/3] [clang] Implement CWG2815 CWG2815 "Overload resolution for refe

[clang] [clang] Implement CWG2815 (PR #132778)

2025-03-25 Thread via cfe-commits
@@ -110,12 +110,16 @@ Resolutions to C++ Defect Reports two releases. The improvements to template template parameter matching implemented in the previous release, as described in P3310 and P3579, made this flag unnecessary. +- Implemented |CWG2815|_ cor

[clang] [clang] Implement CWG2815 (PR #132778)

2025-03-25 Thread via cfe-commits
@@ -47,6 +47,28 @@ void f() { #endif } // namespace cwg2813 +namespace cwg2815 { // cwg2815: 21 +#if __cpp_noexcept_function_type >= 201510 +int arg() noexcept; + +int f(int (&)() noexcept); +void f(int (&)()); +int i = f(arg); + +int g(int (*)() noexcept); +void g(int (&)());

[clang] [clang] Implement CWG2815 (PR #132778)

2025-03-25 Thread via cfe-commits
https://github.com/offsetof updated https://github.com/llvm/llvm-project/pull/132778 >From 0aa1e7b83888bde7112327fba7db9bdcb71c43d9 Mon Sep 17 00:00:00 2001 From: offsetof Date: Mon, 24 Mar 2025 16:28:28 + Subject: [PATCH 1/2] [clang] Implement CWG2815 CWG2815 "Overload resolution for refe

[clang] [clang] Implement CWG2815 (PR #132778)

2025-03-25 Thread via cfe-commits
@@ -5229,10 +5229,23 @@ TryReferenceInit(Sema &S, Expr *Init, QualType DeclType, S.CompareReferenceRelationship(DeclLoc, T1, T2, &RefConv); auto SetAsReferenceBinding = [&](bool BindsDirectly) { +// C++2c [over.ics.ref] p1: offsetof wrote: Right -

[clang] [clang] Implement CWG2815 (PR #132778)

2025-03-25 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 commented: Thanks! https://github.com/llvm/llvm-project/pull/132778 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement CWG2815 (PR #132778)

2025-03-25 Thread Younan Zhang via cfe-commits
@@ -5242,10 +5255,12 @@ TryReferenceInit(Sema &S, Expr *Init, QualType DeclType, // FIXME: As a speculative fix to a defect introduced by CWG2352, we rank // a reference binding that performs a non-top-level qualification // conversion as a qualification conversion,

[clang] [clang] Implement CWG2815 (PR #132778)

2025-03-25 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/132778 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement CWG2815 (PR #132778)

2025-03-25 Thread Younan Zhang via cfe-commits
@@ -12529,11 +12529,11 @@ C++ defect report implementation status Direct or copy initialization for omitted aggregate initializers Unknown - + https://cplusplus.github.io/CWG/issues/2117.html";>2117 -open +NAD Explicit specializations and const

[clang] [clang] Implement CWG2815 (PR #132778)

2025-03-24 Thread via cfe-commits
https://github.com/offsetof created https://github.com/llvm/llvm-project/pull/132778 CWG2815 "Overload resolution for references/pointers to `noexcept` functions" >From 0aa1e7b83888bde7112327fba7db9bdcb71c43d9 Mon Sep 17 00:00:00 2001 From: offsetof Date: Mon, 24 Mar 2025 16:28:28 + Subjec

[clang] [clang] Implement CWG2815 (PR #132778)

2025-03-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (offsetof) Changes CWG2815 "Overload resolution for references/pointers to `noexcept` functions" --- Full diff: https://github.com/llvm/llvm-project/pull/132778.diff 5 Files Affected: - (modified) clang/docs/ReleaseNotes.rst (+4)