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 \
6 // RUN: -x c++-header %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
17 /// expected-no-diagnostics
19 //--- reference.output.json.in
32 "architecture": "arm64",
47 "accessLevel": "public",
48 "declarationFragments": [
50 "kind": "typeIdentifier",
51 "preciseIdentifier": "c:b",
68 "interfaceLanguage": "c++",
72 "displayName": "Global Variable",
73 "identifier": "c++.var"
80 "uri": "file://INPUT_DIR/input.h"
102 "accessLevel": "public",
103 "declarationFragments": [
105 "kind": "typeIdentifier",
106 "preciseIdentifier": "c:b",
114 "kind": "identifier",
122 "kind": "typeIdentifier",
123 "preciseIdentifier": "c:b",
131 "kind": "internalParam",
139 "functionSignature": {
142 "declarationFragments": [
144 "kind": "typeIdentifier",
145 "preciseIdentifier": "c:b",
153 "kind": "internalParam",
162 "kind": "typeIdentifier",
163 "preciseIdentifier": "c:b",
169 "interfaceLanguage": "c++",
170 "precise": "c:@F@IsFoo#b#"
173 "displayName": "Function",
174 "identifier": "c++.func"
181 "uri": "file://INPUT_DIR/input.h"
186 "kind": "identifier",
192 "kind": "identifier",