Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / Parser / c2x-func-prototype.c
blobf2a8b8d8bd0944fc09d0bdb81ab69a5e04a6c040
1 // RUN: %clang_cc1 -fsyntax-only -verify=c2x -std=c2x %s
2 // RUN: %clang_cc1 -Wno-strict-prototypes -fsyntax-only -verify -std=c17 %s
3 // expected-no-diagnostics
5 // Functions with an identifier list are not supported in C23.
6 void ident_list(a) // c2x-error {{expected ';' after top level declarator}} \
7 c2x-error {{unknown type name 'a'}}
8 int a;
9 {} // c2x-error {{expected identifier or '('}}
11 // Functions with an empty parameter list are supported as though the function
12 // was declared with a parameter list of (void). Ensure they still parse.
13 void no_param_decl();
14 void no_param_defn() {}
15 void (*var_of_type_with_no_param)();
16 typedef void fn();