[RISCV] Simplify usage of SplatPat_simm5_plus1. NFC (#125340)
[llvm-project.git] / clang / test / Analysis / store-dump-orders.cpp
blobdbe93f1c5183a9a907a199e5e202961cffc689ed
1 // RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -verify %s 2>&1 | FileCheck %s
2 // expected-no-diagnostics
4 void clang_analyzer_printState();
6 struct Member {
7 int large[10];
8 };
9 Member getMember();
11 struct Class {
12 Member m;
13 int first;
14 int second;
15 int third;
19 void test_output(int n) {
20 Class objsecond;
21 objsecond.m.large[n] = 20;
23 Class objfirst;
25 objfirst.m = getMember();
26 objfirst.second = 2;
27 objfirst.third = 3;
28 objfirst.first = 1;
30 clang_analyzer_printState();
31 // Default binding is before any direct bindings.
32 // Direct bindings are increasing by offset.
33 // Global memory space clusters come before any other clusters.
34 // Otherwise, Clusters are in alphabetical order.
36 // CHECK: "store": { "pointer": "0x{{[0-9a-f]+}}", "items": [
37 // CHECK-NEXT: { "cluster": "GlobalInternalSpaceRegion", "pointer": "0x{{[0-9a-f]+}}", "items": [
38 // CHECK-NEXT: { "kind": "Default", "offset": 0, "value": "conj_$
39 // CHECK-NEXT: ]},
40 // CHECK-NEXT: { "cluster": "GlobalSystemSpaceRegion", "pointer": "0x{{[0-9a-f]+}}", "items": [
41 // CHECK-NEXT: { "kind": "Default", "offset": 0, "value": "conj_$
42 // CHECK-NEXT: ]},
43 // CHECK-NEXT: { "cluster": "objfirst", "pointer": "0x{{[0-9a-f]+}}", "items": [
44 // CHECK-NEXT: { "kind": "Default", "offset": 0, "value": "conj_$
45 // CHECK-NEXT: { "kind": "Direct", "offset": 320, "value": "1 S32b" },
46 // CHECK-NEXT: { "kind": "Direct", "offset": 352, "value": "2 S32b" },
47 // CHECK-NEXT: { "kind": "Direct", "offset": 384, "value": "3 S32b" }
48 // CHECK-NEXT: ]},
49 // CHECK-NEXT: { "cluster": "objsecond", "pointer": "0x{{[0-9a-f]+}}", "items": [
50 // CHECK-NEXT: { "kind": "Default", "offset": 0, "value": "Unknown" },
51 // CHECK-NEXT: { "kind": "Direct", "offset": null, "value": "20 S32b" }
52 // CHECK-NEXT: ]}
53 // CHECK-NEXT: ]},
55 (void)objfirst;
56 (void)objsecond;