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 -std=c++20 -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
18 /// expected-no-diagnostics
20 //--- reference.output.json.in
33 "architecture": "arm64",
48 "source": "c:@N@Foo@S@Bar",
50 "targetFallback": "Foo"
55 "accessLevel": "public",
56 "declarationFragments": [
59 "spelling": "namespace"
75 "interfaceLanguage": "c++",
79 "displayName": "Namespace",
80 "identifier": "c++.namespace"
87 "uri": "file://INPUT_DIR/input.h"
109 "accessLevel": "public",
110 "declarationFragments": [
120 "kind": "identifier",
129 "interfaceLanguage": "c++",
130 "precise": "c:@N@Foo@S@Bar"
133 "displayName": "Class",
134 "identifier": "c++.class"
141 "uri": "file://INPUT_DIR/input.h"
146 "kind": "identifier",
152 "kind": "identifier",