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 -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",
74 "spelling": "noexcept"
81 "functionSignature": {
84 "kind": "typeIdentifier",
85 "preciseIdentifier": "c:v",
91 "interfaceLanguage": "c++",
92 "precise": "c:@F@getFoo#"
95 "displayName": "Function",
96 "identifier": "c++.func"
103 "uri": "file://INPUT_DIR/input.h"
108 "kind": "identifier",
114 "kind": "identifier",
125 "accessLevel": "public",
126 "declarationFragments": [
128 "kind": "typeIdentifier",
129 "preciseIdentifier": "c:v",
137 "kind": "identifier",
150 "spelling": "noexcept"
165 "functionSignature": {
168 "kind": "typeIdentifier",
169 "preciseIdentifier": "c:v",
175 "interfaceLanguage": "c++",
176 "precise": "c:@F@getBar#"
179 "displayName": "Function",
180 "identifier": "c++.func"
187 "uri": "file://INPUT_DIR/input.h"
192 "kind": "identifier",
198 "kind": "identifier",
209 "accessLevel": "public",
210 "declarationFragments": [
212 "kind": "typeIdentifier",
213 "preciseIdentifier": "c:v",
221 "kind": "identifier",
222 "spelling": "getFooBar"
234 "spelling": "noexcept"
249 "functionSignature": {
252 "kind": "typeIdentifier",
253 "preciseIdentifier": "c:v",
259 "interfaceLanguage": "c++",
260 "precise": "c:@F@getFooBar#"
263 "displayName": "Function",
264 "identifier": "c++.func"
271 "uri": "file://INPUT_DIR/input.h"
276 "kind": "identifier",
277 "spelling": "getFooBar"
282 "kind": "identifier",
283 "spelling": "getFooBar"