Driver: tweak handling of '--analyze' to invoke
[clang.git] / test / Sema / types.c
blobf3244f7799b67ef38b37ade13ca8c08129df39d4
1 // RUN: %clang_cc1 %s -pedantic -verify -triple=x86_64-apple-darwin9
3 // rdar://6097662
4 typedef int (*T)[2];
5 restrict T x;
7 typedef int *S[2];
8 restrict S y; // expected-error {{restrict requires a pointer or reference ('S' (aka 'int *[2]') is invalid)}}
12 // int128_t is available.
13 int a() {
14 __int128_t s;
15 __uint128_t t;
17 // but not a keyword
18 int b() {
19 int __int128_t;
20 int __uint128_t;
24 // Array type merging should convert array size to whatever matches the target
25 // pointer size.
26 // rdar://6880874
27 extern int i[1LL];
28 int i[(short)1];
30 enum e { e_1 };
31 extern int j[sizeof(enum e)]; // expected-note {{previous definition}}
32 int j[42]; // expected-error {{redefinition of 'j' with a different type}}
34 // rdar://6880104
35 _Decimal32 x; // expected-error {{GNU decimal type extension not supported}}
38 // rdar://6880951
39 int __attribute__ ((vector_size (8), vector_size (8))) v; // expected-error {{invalid vector element type}}