[ELF] Avoid make in elf::writeARMCmseImportLib
[llvm-project.git] / clang / test / Analysis / designated-initializer.c
blob6274ed12911a45bbcb9c98b0d530a27bdf91e6f4
1 // RUN: %clang_analyze_cc1 -analyzer-checker=debug.DumpCFG %s 2>&1 \
2 // RUN: | FileCheck %s
4 struct Q { int a, b, c; };
5 union UQ { struct Q q; };
6 union UQ getUQ(void) {
7 union UQ u = { { 1, 2, 3 } };
8 return u;
11 void test(void) {
12 struct LUQ { union UQ uq; } var = { getUQ(), .uq.q.a = 100 };
13 struct Q s[] = {
14 [0] = (struct Q){1, 2},
15 [0].c = 3
16 };
19 // CHECK: void test(void)
20 // CHECK: [B1]
21 // CHECK: 1: getUQ
22 // CHECK: 2: [B1.1] (ImplicitCastExpr, FunctionToPointerDecay, union UQ (*)(void))
23 // CHECK: 3: [B1.2]()
24 // CHECK: 4: 100
25 // CHECK: 5: /*no init*/
26 // CHECK: 6: /*no init*/
27 // CHECK: 7: {[B1.4], [B1.5], [B1.6]}
28 // CHECK: 8: {[B1.7]}
29 // CHECK: 9: {/*base*/[B1.3], /*updater*/[B1.8]}
30 // CHECK: 10: {[B1.3], .uq.q.a = [B1.4]}
31 // CHECK: 11: struct LUQ var = {getUQ(), .uq.q.a = 100};
32 // CHECK: 12: 1
33 // CHECK: 13: 2
34 // CHECK: 14: {[B1.12], [B1.13]}
35 // CHECK: 17: /*no init*/
36 // CHECK: 18: /*no init*/
37 // CHECK: 19: 3
38 // CHECK: 20: {[B1.17], [B1.18], [B1.19]}
39 // CHECK: 21: {/*base*/[B1.16], /*updater*/[B1.20]}
40 // CHECK: 23: struct Q s[] = {[0] = (struct Q){1, 2}, [0].c = 3};