blob: b899f15ce6388edece25c29c31e27aa152814928 [file] [log] [blame]
Douglas Gregorc0004df2012-01-11 04:25:01 +00001// RUN: %clang_cc1 -std=c11 %s -verify
2
3typedef int type;
4typedef type type;
5typedef int type;
6
7void f(int N) {
8 typedef int type2;
9 typedef type type2;
10 typedef int type2;
11
12 typedef int vla[N]; // expected-note{{previous definition is here}}
Douglas Gregorec3bd722012-01-11 22:33:48 +000013 typedef int vla[N]; // expected-error{{redefinition of typedef for variably-modified type 'int [N]'}}
Douglas Gregor72b8f782012-01-11 22:43:46 +000014
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]')}}
Douglas Gregorc0004df2012-01-11 04:25:01 +000018}