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
14 void getFoo() noexcept
;
16 void getBar() noexcept(true);
18 void getFooBar() noexcept(false);
19 /// expected-no-diagnostics
21 //--- reference.output.json.in
34 "architecture": "arm64",
49 "accessLevel": "public",
50 "declarationFragments": [
52 "kind": "typeIdentifier",
53 "preciseIdentifier": "c:v",
70 "spelling": "noexcept"
77 "functionSignature": {
80 "kind": "typeIdentifier",
81 "preciseIdentifier": "c:v",
87 "interfaceLanguage": "c++",
88 "precise": "c:@F@getFoo#"
91 "displayName": "Function",
92 "identifier": "c++.func"
99 "uri": "file://INPUT_DIR/input.h"
104 "kind": "identifier",
110 "kind": "identifier",
121 "accessLevel": "public",
122 "declarationFragments": [
124 "kind": "typeIdentifier",
125 "preciseIdentifier": "c:v",
133 "kind": "identifier",
142 "spelling": "noexcept"
157 "functionSignature": {
160 "kind": "typeIdentifier",
161 "preciseIdentifier": "c:v",
167 "interfaceLanguage": "c++",
168 "precise": "c:@F@getBar#"
171 "displayName": "Function",
172 "identifier": "c++.func"
179 "uri": "file://INPUT_DIR/input.h"
184 "kind": "identifier",
190 "kind": "identifier",
201 "accessLevel": "public",
202 "declarationFragments": [
204 "kind": "typeIdentifier",
205 "preciseIdentifier": "c:v",
213 "kind": "identifier",
214 "spelling": "getFooBar"
222 "spelling": "noexcept"
237 "functionSignature": {
240 "kind": "typeIdentifier",
241 "preciseIdentifier": "c:v",
247 "interfaceLanguage": "c++",
248 "precise": "c:@F@getFooBar#"
251 "displayName": "Function",
252 "identifier": "c++.func"
259 "uri": "file://INPUT_DIR/input.h"
264 "kind": "identifier",
265 "spelling": "getFooBar"
270 "kind": "identifier",
271 "spelling": "getFooBar"