[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / clang / test / Sema / sugar-common-types.c
blob54a6e3afed42111bc8cf694975ca0a98031fd818
1 // RUN: %clang_cc1 -fsyntax-only -verify %s -std=c99 -triple aarch64 -target-feature +bf16 -target-feature +sve
3 typedef struct N {} N;
5 typedef int B1;
6 typedef B1 X1;
7 typedef B1 Y1;
9 typedef void B2;
10 typedef B2 X2;
11 typedef B2 Y2;
13 typedef struct B3 {} B3;
14 typedef B3 X3;
15 typedef B3 Y3;
17 typedef struct B4 {} *B4;
18 typedef B4 X4;
19 typedef B4 Y4;
21 typedef __bf16 B5;
22 typedef B5 X5;
23 typedef B5 Y5;
25 typedef __SVInt8_t B6;
26 typedef B6 X6;
27 typedef B6 Y6;
29 N t1 = 0 ? (X1)0 : (Y1)0; // expected-error {{incompatible type 'B1'}}
30 N t2 = 0 ? (X2)0 : 0; // expected-error {{incompatible type 'X2'}}
31 N t3 = 0 ? 0 : (Y2)0; // expected-error {{incompatible type 'Y2'}}
32 N t4 = 0 ? (X2)0 : (Y2)0; // expected-error {{incompatible type 'B2'}}
33 N t5 = 0 ? (X3){} : (Y3){}; // expected-error {{incompatible type 'B3'}}
34 N t6 = 0 ? (X4)0 : (Y4)0; // expected-error {{incompatible type 'B4'}}
36 X5 x5;
37 Y5 y5;
38 N t7 = 0 ? x5 : y5; // expected-error {{incompatible type 'B5'}}
40 void f8() {
41 X6 x6;
42 Y6 y6;
43 N t8 = 0 ? x6 : y6; // expected-error {{incompatible type 'B6'}}