================
@@ -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, ", ");
+      }
+
----------------
antangelo wrote:

I had intended to fallthrough to those if blocks so that the `else if 
(ParmDeclarator.getEllipsisLoc().isValid() || 
Actions.containsUnexpandedParameterPacks(ParmDeclarator))` block would be 
evaluated to also emit the parameter pack diagnostics. Do you think those 
should be omitted in this case?

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

Reply via email to