[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Sema / c11-typedef-redef.c
blob77e28d248338ba4b521efa5bcc137733226c4a4f
1 // RUN: %clang_cc1 -std=c11 %s -verify
3 typedef int type;
4 typedef type type;
5 typedef int type;
7 void f(int N) {
8 typedef int type2;
9 typedef type type2;
10 typedef int type2;
12 typedef int vla[N]; // expected-note{{previous definition is here}}
13 typedef int vla[N]; // expected-error{{redefinition of typedef for variably-modified type 'int[N]'}}
15 typedef int vla2[N];
16 typedef vla2 vla3; // expected-note{{previous definition is here}}
17 typedef vla2 vla3; // expected-error{{redefinition of typedef for variably-modified type 'vla2' (aka 'int[N]')}}