[clang] [clang] Implement P3176R1: The Oxford variadic comma (PR #117524)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 26 00:43:11 PST 2024
================
@@ -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
+ // parameter-list '...' is deprecated
+ Diag(EllipsisLoc, diag::warn_deprecated_missing_comma_before_ellipsis)
+ << FixItHint::CreateInsertion(EllipsisLoc, ", ");
+ }
+
----------------
cor3ntin wrote:
below: `else if (!getLangOpts().CPlusPlus) {`
https://github.com/llvm/llvm-project/pull/117524
More information about the cfe-commits
mailing list