================
@@ -6,27 +6,20 @@
 
 #include <stdarg.h>
 
-#define DERP this is an error
-
 void func(...) { // expected-warning {{'...' as the only parameter of a 
function is incompatible with C standards before C23}}
   // Show that va_start doesn't require the second argument in C23 mode.
   va_list list;
-  va_start(list); // expected-warning {{passing no argument for the '...' 
parameter of a variadic macro is incompatible with C standards before C23}} 
expected-note@* {{macro 'va_start' defined here}}
-  va_end(list);
-
-  // Show that va_start doesn't expand or evaluate the second argument.
-  va_start(list, DERP);
+  va_start(list);
----------------
AaronBallman wrote:

> `// expected-warning {{passing no argument for the '...' parameter of a 
> variadic macro is incompatible with C standards before C23}}`

This no longer fires because the definition of `va_start` in C23 mode now 
passes `__VA_ARGS__` so `list` is being passed as the variadic argument.

> `// Show that va_start doesn't expand or evaluate the second argument.`

This was changed during NB comment resolution. Now arguments are evaluated and 
expanded.

https://github.com/llvm/llvm-project/pull/131166
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to