3 // RUN: split-file %s %t
4 // RUN: sed -e "s@INPUT_DIR@%{/t:regex_replacement}@g" \
5 // RUN: %t/reference.output.json.in >> %t/reference.output.json
6 // RUN: %clang_cc1 -extract-api -triple arm64-apple-macosx \
7 // RUN: -x c++-header %t/input.h -o %t/output.json -verify
9 // Generator version is not consistent across test runs, normalize it.
10 // RUN: sed -e "s@\"generator\": \".*\"@\"generator\": \"?\"@g" \
11 // RUN: %t/output.json >> %t/output-normalized.json
12 // RUN: diff %t/reference.output.json %t/output-normalized.json
17 class Foo
: public Fizz
{};
19 class Bar
: public Fizz
{};
21 class FooBar
: public Foo
, public Bar
{};
22 /// expected-no-diagnostics
24 //--- reference.output.json.in
37 "architecture": "arm64",
51 "kind": "inheritsFrom",
53 "target": "c:@S@Fizz",
54 "targetFallback": "Fizz"
57 "kind": "inheritsFrom",
59 "target": "c:@S@Fizz",
60 "targetFallback": "Fizz"
63 "kind": "inheritsFrom",
64 "source": "c:@S@FooBar",
66 "targetFallback": "Foo"
69 "kind": "inheritsFrom",
70 "source": "c:@S@FooBar",
72 "targetFallback": "Bar"
77 "accessLevel": "public",
78 "declarationFragments": [
97 "interfaceLanguage": "c++",
98 "precise": "c:@S@Fizz"
101 "displayName": "Class",
102 "identifier": "c++.class"
109 "uri": "file://INPUT_DIR/input.h"
114 "kind": "identifier",
120 "kind": "identifier",
131 "accessLevel": "public",
132 "declarationFragments": [
142 "kind": "identifier",
151 "interfaceLanguage": "c++",
152 "precise": "c:@S@Foo"
155 "displayName": "Class",
156 "identifier": "c++.class"
163 "uri": "file://INPUT_DIR/input.h"
168 "kind": "identifier",
174 "kind": "identifier",
185 "accessLevel": "public",
186 "declarationFragments": [
196 "kind": "identifier",
205 "interfaceLanguage": "c++",
206 "precise": "c:@S@Bar"
209 "displayName": "Class",
210 "identifier": "c++.class"
217 "uri": "file://INPUT_DIR/input.h"
222 "kind": "identifier",
228 "kind": "identifier",
239 "accessLevel": "public",
240 "declarationFragments": [
250 "kind": "identifier",
259 "interfaceLanguage": "c++",
260 "precise": "c:@S@FooBar"
263 "displayName": "Class",
264 "identifier": "c++.class"
271 "uri": "file://INPUT_DIR/input.h"
276 "kind": "identifier",
282 "kind": "identifier",