================ @@ -0,0 +1,33 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -Wold-style-declaration %s +// RUN: %clang_cc1 -fsyntax-only -verify -Wextra %s + +static int x0; +int __attribute__ ((aligned (16))) static x1; // expected-warning {{'static' is not at beginning of declaration}} + +extern int x2; +int extern x3; // expected-warning {{'extern' is not at beginning of declaration}} + +typedef int x4; +int typedef x5; // expected-warning {{'typedef' is not at beginning of declaration}} + +void g (int); + +void +f (void) +{ + auto int x6 = 0; + int auto x7 = 0; // expected-warning {{'auto' is not at beginning of declaration}} ---------------- AaronBallman wrote:
This is going to cause problems when we update to `-std=c23`, so it might be good to guard this on `__STDC_VERSION__` to save ourselves some headaches later. https://github.com/llvm/llvm-project/pull/78837 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits