[clang] [Clang] Accept auto parameters pre-C++20 as an extension (PR #200670)

Vlad Serebrennikov via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 1 01:57:49 PDT 2026


================
@@ -269,8 +269,7 @@ namespace cwg625 { // cwg625: 2.9
   void f(int);
   void (*p)(auto) = f;
   // cxx98-error at -1 {{'auto' type specifier is a C++11 extension}}
-  // cxx98-17-error at -2 {{'auto' not allowed in function prototype}}
----------------
Endilll wrote:

I think this diagnostic should've been replaced with the new `ext_auto_arg` instead of being removed. Right now there is nothing pointing out that `auto` parameters are an extension in C++11 through C++17.

https://github.com/llvm/llvm-project/pull/200670


More information about the cfe-commits mailing list