[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / AST / ast-dump-objc-arc-json.m
blob5792c8bf58776bb1751bcdade53abac12043df15
1 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -x objective-c -fobjc-arc -ast-dump=json -ast-dump-filter Test %s | FileCheck %s
3 typedef struct {
4   id f;
5 } S;
7 id TestCompoundLiteral(id a) {
8   return ((S){ .f = a }).f;
11 // CHECK:  "kind": "ExprWithCleanups",
12 // CHECK-NEXT:  "range": {
13 // CHECK-NEXT:   "begin": {
14 // CHECK-NEXT:    "offset": {{[0-9]+}},
15 // CHECK-NEXT:    "col": 10,
16 // CHECK-NEXT:    "tokLen": 1
17 // CHECK-NEXT:   },
18 // CHECK-NEXT:   "end": {
19 // CHECK-NEXT:    "offset": {{[0-9]+}},
20 // CHECK-NEXT:    "col": 26,
21 // CHECK-NEXT:    "tokLen": 1
22 // CHECK-NEXT:   }
23 // CHECK-NEXT:  },
24 // CHECK-NEXT:  "type": {
25 // CHECK-NEXT:   "desugaredQualType": "id",
26 // CHECK-NEXT:   "qualType": "id",
27 // CHECK-NEXT:   "typeAliasDeclId": "0x{{.*}}"
28 // CHECK-NEXT:  },
29 // CHECK-NEXT:  "valueCategory": "prvalue",
30 // CHECK-NEXT:  "cleanupsHaveSideEffects": true,
31 // CHECK-NEXT:  "cleanups": [
32 // CHECK-NEXT:   {
33 // CHECK-NEXT:    "id": "0x{{.*}}",
34 // CHECK-NEXT:    "kind": "CompoundLiteralExpr"
35 // CHECK-NEXT:   }
36 // CHECK-NEXT:  ],