[clang] [Clang] Implement CWG2517 Useless restriction on use of parameter in constraint-expression (PR #132919)

2025-04-05 Thread Imad Aldij via cfe-commits
@@ -32,6 +32,26 @@ enum E2 : S::I { e }; #endif } // namespace cwg2516 +namespace cwg2517 { // cwg2517: 21 +#if __cplusplus >= 202302L imdj wrote: Shouldn't it follow the status mentioned here https://cplusplus.github.io/CWG/issues/2517.html? or it there a m

[clang] [Clang] Implement CWG2517 Useless restriction on use of parameter in constraint-expression (PR #132919)

2025-04-04 Thread Imad Aldij via cfe-commits
https://github.com/imdj updated https://github.com/llvm/llvm-project/pull/132919 >From 7905577616743f5158560a4b337148ef9cd25f1e Mon Sep 17 00:00:00 2001 From: Imad Aldij Date: Tue, 25 Mar 2025 14:50:55 +0200 Subject: [PATCH 1/7] [Clang] Implement CWG2517 Useless restriction on use of parameter

[clang] [Clang] Implement CWG2517 Useless restriction on use of parameter in constraint-expression (PR #132919)

2025-03-26 Thread Imad Aldij via cfe-commits
https://github.com/imdj edited https://github.com/llvm/llvm-project/pull/132919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement CWG2517 Useless restriction on use of parameter in constraint-expression (PR #132919)

2025-03-26 Thread Imad Aldij via cfe-commits
https://github.com/imdj edited https://github.com/llvm/llvm-project/pull/132919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement CWG2517 Useless restriction on use of parameter in constraint-expression (PR #132919)

2025-03-26 Thread Imad Aldij via cfe-commits
@@ -32,6 +32,26 @@ enum E2 : S::I { e }; #endif } // namespace cwg2516 +namespace cwg2517 { // cwg2517: 21 +#if __cplusplus >= 202302L imdj wrote: Ok, so it's often based on when the issue was first introduced. Thanks for clearing my misunderstanding. https

[clang] [Clang] Implement CWG2517 Useless restriction on use of parameter in constraint-expression (PR #132919)

2025-03-26 Thread Imad Aldij via cfe-commits
https://github.com/imdj updated https://github.com/llvm/llvm-project/pull/132919 >From 7905577616743f5158560a4b337148ef9cd25f1e Mon Sep 17 00:00:00 2001 From: Imad Aldij Date: Tue, 25 Mar 2025 14:50:55 +0200 Subject: [PATCH 1/8] [Clang] Implement CWG2517 Useless restriction on use of parameter

[clang] [Clang] Implement CWG2517 Useless restriction on use of parameter in constraint-expression (PR #132919)

2025-03-25 Thread Imad Aldij via cfe-commits
https://github.com/imdj updated https://github.com/llvm/llvm-project/pull/132919 >From 7905577616743f5158560a4b337148ef9cd25f1e Mon Sep 17 00:00:00 2001 From: Imad Aldij Date: Tue, 25 Mar 2025 14:50:55 +0200 Subject: [PATCH 1/6] [Clang] Implement CWG2517 Useless restriction on use of parameter

[clang] [Clang] Implement CWG2517 Useless restriction on use of parameter in constraint-expression (PR #132919)

2025-03-25 Thread Imad Aldij via cfe-commits
@@ -98,13 +98,6 @@ namespace std_example { using c1c2 = C_check; // expected-error{{constraints not satisfied for class template 'C_check' [with T = int *]}} } -// typeid() of an expression becomes potentially evaluated if the expression is -// of a polymorphic type. -class

[clang] [Clang] Implement CWG2517 Useless restriction on use of parameter in constraint-expression (PR #132919)

2025-03-25 Thread Imad Aldij via cfe-commits
@@ -37,13 +37,6 @@ namespace std_example { static_assert(D); template struct D_check {}; // expected-note{{because 'short' does not satisfy 'D'}} using dc1 = D_check; // expected-error{{constraints not satisfied for class template 'D_check' [with T = short]}} - - templ

[clang] [Clang] Implement CWG2517 Useless restriction on use of parameter in constraint-expression (PR #132919)

2025-03-25 Thread Imad Aldij via cfe-commits
https://github.com/imdj updated https://github.com/llvm/llvm-project/pull/132919 >From 7905577616743f5158560a4b337148ef9cd25f1e Mon Sep 17 00:00:00 2001 From: Imad Aldij Date: Tue, 25 Mar 2025 14:50:55 +0200 Subject: [PATCH 1/6] [Clang] Implement CWG2517 Useless restriction on use of parameter

[clang] [Clang] Implement CWG2517 Useless restriction on use of parameter in constraint-expression (PR #132919)

2025-03-25 Thread Imad Aldij via cfe-commits
@@ -32,6 +32,26 @@ enum E2 : S::I { e }; #endif } // namespace cwg2516 +namespace cwg2517 { // cwg2517: 23 imdj wrote: Thank you, I wasn't sure how this work related to releases. I fixed it. https://github.com/llvm/llvm-project/pull/132919 __

[clang] [Clang] Implement CWG2517 Useless restriction on use of parameter in constraint-expression (PR #132919)

2025-03-25 Thread Imad Aldij via cfe-commits
https://github.com/imdj updated https://github.com/llvm/llvm-project/pull/132919 >From 7905577616743f5158560a4b337148ef9cd25f1e Mon Sep 17 00:00:00 2001 From: Imad Aldij Date: Tue, 25 Mar 2025 14:50:55 +0200 Subject: [PATCH 1/5] [Clang] Implement CWG2517 Useless restriction on use of parameter

[clang] [Clang] Implement CWG2517 Useless restriction on use of parameter in constraint-expression (PR #132919)

2025-03-25 Thread Imad Aldij via cfe-commits
https://github.com/imdj ready_for_review https://github.com/llvm/llvm-project/pull/132919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement CWG2517 Useless restriction on use of parameter in constraint-expression (PR #132919)

2025-03-25 Thread Imad Aldij via cfe-commits
https://github.com/imdj updated https://github.com/llvm/llvm-project/pull/132919 >From 7905577616743f5158560a4b337148ef9cd25f1e Mon Sep 17 00:00:00 2001 From: Imad Aldij Date: Tue, 25 Mar 2025 14:50:55 +0200 Subject: [PATCH 1/5] [Clang] Implement CWG2517 Useless restriction on use of parameter

[clang] [Clang] Implement CWG2517 Useless restriction on use of parameter in constraint-expression (PR #132919)

2025-03-25 Thread Imad Aldij via cfe-commits
https://github.com/imdj converted_to_draft https://github.com/llvm/llvm-project/pull/132919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement CWG2517 Useless restriction on use of parameter in constraint-expression (PR #132919)

2025-03-25 Thread Imad Aldij via cfe-commits
@@ -155,6 +155,19 @@ int g() { } } +namespace GH132825 { imdj wrote: Thank you for the feedback. Will do. https://github.com/llvm/llvm-project/pull/132919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang] [Clang] Implement CWG2517 Useless restriction on use of parameter in constraint-expression (PR #132919)

2025-03-25 Thread Imad Aldij via cfe-commits
https://github.com/imdj updated https://github.com/llvm/llvm-project/pull/132919 >From 8ed77e7bb4d26ad5b2f87d65c77e3faa4539502c Mon Sep 17 00:00:00 2001 From: Imad Aldij Date: Tue, 25 Mar 2025 13:54:49 +0200 Subject: [PATCH] Remove the restriction that local parameters in constraint-expressions

[clang] [Clang] Implement CWG2517 Useless restriction on use of parameter in constraint-expression (PR #132919)

2025-03-25 Thread Imad Aldij via cfe-commits
https://github.com/imdj ready_for_review https://github.com/llvm/llvm-project/pull/132919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement CWG2517 Useless restriction on use of parameter in constraint-expression (PR #132919)

2025-03-25 Thread Imad Aldij via cfe-commits
https://github.com/imdj created https://github.com/llvm/llvm-project/pull/132919 Remove `[expr.prim.req.nested]` check which restrict that local parameters in constraint-expressions can only appear as unevaluated operands. This change makes the treatment of examples like `requires` expressions

[clang] [Clang][NFC] Rename SecondArgIsLastNamedArgument for clarity and consistency (PR #131346)

2025-03-15 Thread Imad Aldij via cfe-commits
imdj wrote: I just did a rebase after the merge of #131166 . Could you take a look please @AaronBallman and see if everything looks good now? https://github.com/llvm/llvm-project/pull/131346 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[clang] [Clang][NFC] Rename SecondArgIsLastNamedArgument for clarity and consistency (PR #131346)

2025-03-15 Thread Imad Aldij via cfe-commits
https://github.com/imdj updated https://github.com/llvm/llvm-project/pull/131346 >From 0b0361fe5f9c15a2682a642584dc6901053ae1cd Mon Sep 17 00:00:00 2001 From: Imad Aldij Date: Sat, 15 Mar 2025 21:43:06 +0200 Subject: [PATCH] [Clang] Rename SecondArgIsLastNamedArgument for clarity and consistenc

[clang] [Clang][NFC] Rename SecondArgIsLastNamedArgument for clarity and consistency (PR #131346)

2025-03-15 Thread Imad Aldij via cfe-commits
https://github.com/imdj updated https://github.com/llvm/llvm-project/pull/131346 >From 6ecbeba21b4d9e2309b0468a90387e7c890ce109 Mon Sep 17 00:00:00 2001 From: Imad Aldij Date: Fri, 14 Mar 2025 17:58:07 +0200 Subject: [PATCH] [Clang] Rename SecondArgIsLastNamedArgument for clarity and consistenc

[clang] [Clang] Rename SecondArgIsLastNamedArgument for clarity and consistency (PR #131346)

2025-03-14 Thread Imad Aldij via cfe-commits
https://github.com/imdj updated https://github.com/llvm/llvm-project/pull/131346 >From 3b2f0f906d24b812f1806540f88b0668198dfa42 Mon Sep 17 00:00:00 2001 From: Imad Aldij Date: Fri, 14 Mar 2025 17:51:34 +0200 Subject: [PATCH] [Clang] Rename SecondArgIsLastNamedArgument for clarity Update the var

[clang] [Clang] Rename SecondArgIsLastNamedArgument for clarity and consistency (PR #131346)

2025-03-14 Thread Imad Aldij via cfe-commits
imdj wrote: cc: @erichkeane https://github.com/llvm/llvm-project/pull/131346 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Rename SecondArgIsLastNamedArgument for clarity and consistency (PR #131346)

2025-03-14 Thread Imad Aldij via cfe-commits
https://github.com/imdj updated https://github.com/llvm/llvm-project/pull/131346 >From 6ecbeba21b4d9e2309b0468a90387e7c890ce109 Mon Sep 17 00:00:00 2001 From: Imad Aldij Date: Fri, 14 Mar 2025 17:58:07 +0200 Subject: [PATCH] [Clang] Rename SecondArgIsLastNamedArgument for clarity and consistenc

[clang] [Clang] Rename SecondArgIsLastNamedArgument for clarity and consistency (PR #131346)

2025-03-14 Thread Imad Aldij via cfe-commits
https://github.com/imdj edited https://github.com/llvm/llvm-project/pull/131346 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Rename SecondArgIsLastNamedArgument for clarity and consistency (PR #131346)

2025-03-14 Thread Imad Aldij via cfe-commits
https://github.com/imdj created https://github.com/llvm/llvm-project/pull/131346 Change the name of the control variable `SecondArgIsLastNamedArgument` to `SecondArgIsLastNonVariadicArgument` for clarity and consistency. Following feedback on earlier PR that was merged: - #131238 >From 3f493

[clang] [clang] Fix inaccurate wording of warn_second_arg_of_va_start_not_last_named_param (PR #131238)

2025-03-14 Thread Imad Aldij via cfe-commits
@@ -4893,7 +4893,7 @@ bool Sema::BuiltinVAStart(unsigned BuiltinID, CallExpr *TheCall) { if (!SecondArgIsLastNamedArgument) Diag(TheCall->getArg(1)->getBeginLoc(), - diag::warn_second_arg_of_va_start_not_last_named_param); imdj wrote: What is t