[clang] [clang] Implement P3176R1: The Oxford variadic comma (PR #117524)

2024-12-02 Thread via cfe-commits
https://github.com/antangelo closed https://github.com/llvm/llvm-project/pull/117524 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement P3176R1: The Oxford variadic comma (PR #117524)

2024-12-02 Thread via cfe-commits
cor3ntin wrote: @antangelo Thanks! Feel free to merge https://github.com/llvm/llvm-project/pull/117524 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement P3176R1: The Oxford variadic comma (PR #117524)

2024-12-01 Thread via cfe-commits
@@ -0,0 +1,49 @@ +// RUN: %clang_cc1 -std=c++2c -fsyntax-only -verify %s + +void a(...); + +void b(auto...); +void c(auto, ...); + +void d(auto..); // expected-warning {{declaration of a variadic function without a comma before '...' is deprecated}} \ +//

[clang] [clang] Implement P3176R1: The Oxford variadic comma (PR #117524)

2024-12-01 Thread via cfe-commits
https://github.com/antangelo updated https://github.com/llvm/llvm-project/pull/117524 >From ffcae3a593f1324b5f5495b42bb0ec61a61c2055 Mon Sep 17 00:00:00 2001 From: antangelo Date: Mon, 25 Nov 2024 01:54:26 -0500 Subject: [PATCH 1/5] [clang] Implement P3176R1: The Oxford variadic comma Emit a w

[clang] [clang] Implement P3176R1: The Oxford variadic comma (PR #117524)

2024-11-27 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,49 @@ +// RUN: %clang_cc1 -std=c++2c -fsyntax-only -verify %s + +void a(...); + +void b(auto...); +void c(auto, ...); + +void d(auto..); // expected-warning {{declaration of a variadic function without a comma before '...' is deprecated}} \ +//

[clang] [clang] Implement P3176R1: The Oxford variadic comma (PR #117524)

2024-11-26 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM, thanks https://github.com/llvm/llvm-project/pull/117524 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement P3176R1: The Oxford variadic comma (PR #117524)

2024-11-26 Thread via cfe-commits
@@ -8119,6 +8119,14 @@ void Parser::ParseParameterDeclarationClause( } if (TryConsumeToken(tok::ellipsis, EllipsisLoc)) { + if (getLangOpts().CPlusPlus26) { +// C++26 [dcl.dcl.fct]p3: +// A parameter-declaration-clause of the form +// p

[clang] [clang] Implement P3176R1: The Oxford variadic comma (PR #117524)

2024-11-26 Thread via cfe-commits
@@ -413,6 +413,9 @@ def err_function_scope_depth_exceeded : Error< "function scope depth exceeded maximum of %0">, DefaultFatal; def err_missing_comma_before_ellipsis : Error< "C requires a comma prior to the ellipsis in a variadic function type">; +def warn_deprecated_miss

[clang] [clang] Implement P3176R1: The Oxford variadic comma (PR #117524)

2024-11-26 Thread via cfe-commits
@@ -8119,6 +8119,14 @@ void Parser::ParseParameterDeclarationClause( } if (TryConsumeToken(tok::ellipsis, EllipsisLoc)) { + if (getLangOpts().CPlusPlus26) { +// C++26 [dcl.dcl.fct]p3: +// A parameter-declaration-clause of the form +// p

[clang] [clang] Implement P3176R1: The Oxford variadic comma (PR #117524)

2024-11-25 Thread via cfe-commits
@@ -0,0 +1,36 @@ +// RUN: %clang_cc1 -std=c++2c -fsyntax-only -verify %s + +void a(...); Sirraide wrote: A few more test cases that came to mind: ```c++ struct S { void g(this S...) {} }; template void f(Ts..) {} template void g(T...) {} ``` https:/

[clang] [clang] Implement P3176R1: The Oxford variadic comma (PR #117524)

2024-11-25 Thread via cfe-commits
https://github.com/Sirraide commented: I managed to think of a few more test cases, but other than that, this looks fine imo. https://github.com/llvm/llvm-project/pull/117524 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[clang] [clang] Implement P3176R1: The Oxford variadic comma (PR #117524)

2024-11-25 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/117524 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement P3176R1: The Oxford variadic comma (PR #117524)

2024-11-24 Thread via cfe-commits
https://github.com/antangelo created https://github.com/llvm/llvm-project/pull/117524 Emit a deprecation warning when a variadic parameter in a parameter-declaration-clause is not preceded by a comma for C++26. >From ffcae3a593f1324b5f5495b42bb0ec61a61c2055 Mon Sep 17 00:00:00 2001 From: antan

[clang] [clang] Implement P3176R1: The Oxford variadic comma (PR #117524)

2024-11-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (antangelo) Changes Emit a deprecation warning when a variadic parameter in a parameter-declaration-clause is not preceded by a comma for C++26. --- Full diff: https://github.com/llvm/llvm-project/pull/117524.diff 7 Files Affected: