2 // RUN: split-file %s %t
3 // RUN: sed -e "s@INPUT_DIR@%{/t:regex_replacement}@g" \
4 // RUN: %t/reference.output.json.in >> %t/reference.output.json
5 // RUN: %clang_cc1 -extract-api --pretty-sgf -triple arm64-apple-macosx -x c-header\
6 // RUN: %t/input.h -o %t/output.json -verify
8 // Generator version is not consistent across test runs, normalize it.
9 // RUN: sed -e "s@\"generator\": \".*\"@\"generator\": \"?\"@g" \
10 // RUN: %t/output.json >> %t/output-normalized.json
11 // RUN: diff %t/reference.output.json %t/output-normalized.json
21 // expected-no-diagnostics
23 //--- reference.output.json.in
36 "architecture": "arm64",
51 "source": "c:@U@Union@FI@a",
52 "target": "c:@U@Union",
53 "targetFallback": "Union"
57 "source": "c:@U@Union@FI@b",
58 "target": "c:@U@Union",
59 "targetFallback": "Union"
64 "accessLevel": "public",
65 "declarationFragments": [
101 "interfaceLanguage": "c",
102 "precise": "c:@U@Union"
105 "displayName": "Union",
106 "identifier": "c.union"
113 "uri": "file://INPUT_DIR/input.h"
118 "kind": "identifier",
124 "kind": "identifier",
135 "accessLevel": "public",
136 "declarationFragments": [
138 "kind": "typeIdentifier",
139 "preciseIdentifier": "c:I",
147 "kind": "identifier",
168 "text": "the a option"
173 "interfaceLanguage": "c",
174 "precise": "c:@U@Union@FI@a"
177 "displayName": "Instance Property",
178 "identifier": "c.property"
185 "uri": "file://INPUT_DIR/input.h"
190 "kind": "identifier",
196 "kind": "identifier",
208 "accessLevel": "public",
209 "declarationFragments": [
211 "kind": "typeIdentifier",
212 "preciseIdentifier": "c:C",
220 "kind": "identifier",
241 "text": "the b option"
246 "interfaceLanguage": "c",
247 "precise": "c:@U@Union@FI@b"
250 "displayName": "Instance Property",
251 "identifier": "c.property"
258 "uri": "file://INPUT_DIR/input.h"
263 "kind": "identifier",
269 "kind": "identifier",