| 1 |
// RUN: %clang_analyze_cc1 -analyzer-checker=core %s -ftime-trace=%t.raw.json -ftime-trace-granularity=0 -verify |
| 2 |
// RUN: %python -c 'import json, sys; print(json.dumps(json.load(sys.stdin), indent=4))' < %t.raw.json > %t.formatted.json |
| 3 |
// RUN: FileCheck --input-file=%t.formatted.json --check-prefix=CHECK %s |
| 4 |
|
| 5 |
// CHECK: "name": "RegionStoreManager::bindArray", |
| 6 |
// CHECK-NEXT: "args": { |
| 7 |
// |
| 8 |
// The below does not necessarily follow immediately, |
| 9 |
// depending on what parts of the array are initialized first. |
| 10 |
// |
| 11 |
// CHECK: "detail": "'arr[0][1]'" |
| 12 |
// CHECK-NEXT: } |
| 13 |
// |
| 14 |
// CHECK: "detail": "'arr[0]'" |
| 15 |
// CHECK-NEXT: } |
| 16 |
// |
| 17 |
// CHECK: "detail": "'arr'" |
| 18 |
// CHECK-NEXT: } |
| 19 |
|
| 20 |
int f() { |
| 21 |
int arr[2][2][2] = {{{1, 2}, {3, 4}}, {{5, 6}, {7, 8}}}; |
| 22 |
return arr[1][0][1]; |
| 23 |
} |
| 24 |
// expected-no-diagnostics |