[clang] [clang] Implement CWG2611 (PR #133747)

2025-04-09 Thread via cfe-commits
@@ -35,6 +35,29 @@ namespace std { template T declval(); } // namespace std +namespace cwg2611 { // cwg2611: 21 +#if __cplusplus >= 201703L +template class R {}; +template auto a(Ts... xs) -> R; +template auto b(Ts... xs) -> R; +template auto c(Ts... xs, int i = 0) -> R; +te

[clang] [clang] Implement CWG2611 (PR #133747)

2025-04-09 Thread via cfe-commits
@@ -16441,14 +16441,23 @@ TreeTransform::TransformCXXFoldExpr(CXXFoldExpr *E) { return true; } - if (ParenExpr *PE = dyn_cast_or_null(Result.get())) -PE->setIsProducedByFoldExpansion(); - // If we had no init and an empty pack, and we're not retaining an expan

[clang] [clang] Implement CWG2611 (PR #133747)

2025-04-09 Thread via cfe-commits
https://github.com/offsetof updated https://github.com/llvm/llvm-project/pull/133747 >From 175e2531de9e2fceb72b25aed5073b225e2495ac Mon Sep 17 00:00:00 2001 From: offsetof Date: Mon, 31 Mar 2025 16:35:03 + Subject: [PATCH 1/3] [clang] Implement CWG2611 CWG2611 "Missing parentheses in expan

[clang] [clang] Implement CWG2611 (PR #133747)

2025-04-04 Thread via cfe-commits
https://github.com/offsetof updated https://github.com/llvm/llvm-project/pull/133747 >From 175e2531de9e2fceb72b25aed5073b225e2495ac Mon Sep 17 00:00:00 2001 From: offsetof Date: Mon, 31 Mar 2025 16:35:03 + Subject: [PATCH 1/2] [clang] Implement CWG2611 CWG2611 "Missing parentheses in expan

[clang] [clang] Implement CWG2611 (PR #133747)

2025-03-31 Thread Vlad Serebrennikov via cfe-commits
@@ -35,6 +35,29 @@ namespace std { template T declval(); } // namespace std +namespace cwg2611 { // cwg2611: 21 +#if __cpp_fold_expressions >= 201603 Endilll wrote: ```suggestion #if __cplusplus >= 201703L ``` https://github.com/llvm/llvm-project/pull/1337

[clang] [clang] Implement CWG2611 (PR #133747)

2025-03-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (offsetof) Changes CWG2611 "Missing parentheses in expansion of fold-expression could cause syntactic reinterpretation" Fixes #57396 --- Full diff: https://github.com/llvm/llvm-project/pull/133747.diff 6 Files Affected: - (modifi

[clang] [clang] Implement CWG2611 (PR #133747)

2025-03-31 Thread via cfe-commits
https://github.com/offsetof created https://github.com/llvm/llvm-project/pull/133747 CWG2611 "Missing parentheses in expansion of fold-expression could cause syntactic reinterpretation" Fixes #57396 >From 175e2531de9e2fceb72b25aed5073b225e2495ac Mon Sep 17 00:00:00 2001 From: offsetof Date: