Driver: tweak handling of '--analyze' to invoke
[clang.git] / test / Sema / typedef-retain.c
blob5b963c48b2cc0aa40d2b46d23f5a7ba05bd9a1c4
1 // RUN: %clang_cc1 -fsyntax-only -verify %s -fno-lax-vector-conversions
3 typedef float float4 __attribute__((vector_size(16)));
4 typedef int int4 __attribute__((vector_size(16)));
5 typedef int4* int4p;
7 void test1(float4 a, int4 *result, int i) {
8 result[i] = a; // expected-error {{assigning to 'int4' from incompatible type 'float4'}}
11 void test2(float4 a, int4p result, int i) {
12 result[i] = a; // expected-error {{assigning to 'int4' from incompatible type 'float4'}}
15 // PR2039
16 typedef int a[5];
17 void test3() {
18 typedef const a b;
19 b r;
20 r[0]=10; // expected-error {{read-only variable is not assignable}}
23 int test4(const a y) {
24 y[0] = 10; // expected-error {{read-only variable is not assignable}}
27 // PR2189
28 int test5() {
29 const int s[5]; int t[5];
30 return &s == &t; // expected-warning {{comparison of distinct pointer types}}
33 int test6() {
34 const a s;
35 a t;
36 return &s == &t; // expected-warning {{comparison of distinct pointer types}}