Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / ExtractAPI / multiple_inheritance.cpp
blob505cfa3c44be68d32e60263416960fdd159dd44d
2 // RUN: rm -rf %t
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
14 //--- input.h
15 class Fizz {};
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
26 "metadata": {
27 "formatVersion": {
28 "major": 0,
29 "minor": 5,
30 "patch": 3
32 "generator": "?"
34 "module": {
35 "name": "",
36 "platform": {
37 "architecture": "arm64",
38 "operatingSystem": {
39 "minimumVersion": {
40 "major": 11,
41 "minor": 0,
42 "patch": 0
44 "name": "macosx"
46 "vendor": "apple"
49 "relationships": [
51 "kind": "inheritsFrom",
52 "source": "c:@S@Foo",
53 "target": "c:@S@Fizz",
54 "targetFallback": "Fizz"
57 "kind": "inheritsFrom",
58 "source": "c:@S@Bar",
59 "target": "c:@S@Fizz",
60 "targetFallback": "Fizz"
63 "kind": "inheritsFrom",
64 "source": "c:@S@FooBar",
65 "target": "c:@S@Foo",
66 "targetFallback": "Foo"
69 "kind": "inheritsFrom",
70 "source": "c:@S@FooBar",
71 "target": "c:@S@Bar",
72 "targetFallback": "Bar"
75 "symbols": [
77 "accessLevel": "public",
78 "declarationFragments": [
80 "kind": "keyword",
81 "spelling": "class"
84 "kind": "text",
85 "spelling": " "
88 "kind": "identifier",
89 "spelling": "Fizz"
92 "kind": "text",
93 "spelling": ";"
96 "identifier": {
97 "interfaceLanguage": "c++",
98 "precise": "c:@S@Fizz"
100 "kind": {
101 "displayName": "Class",
102 "identifier": "c++.class"
104 "location": {
105 "position": {
106 "character": 7,
107 "line": 1
109 "uri": "file://INPUT_DIR/input.h"
111 "names": {
112 "navigator": [
114 "kind": "identifier",
115 "spelling": "Fizz"
118 "subHeading": [
120 "kind": "identifier",
121 "spelling": "Fizz"
124 "title": "Fizz"
126 "pathComponents": [
127 "Fizz"
131 "accessLevel": "public",
132 "declarationFragments": [
134 "kind": "keyword",
135 "spelling": "class"
138 "kind": "text",
139 "spelling": " "
142 "kind": "identifier",
143 "spelling": "Foo"
146 "kind": "text",
147 "spelling": ";"
150 "identifier": {
151 "interfaceLanguage": "c++",
152 "precise": "c:@S@Foo"
154 "kind": {
155 "displayName": "Class",
156 "identifier": "c++.class"
158 "location": {
159 "position": {
160 "character": 7,
161 "line": 3
163 "uri": "file://INPUT_DIR/input.h"
165 "names": {
166 "navigator": [
168 "kind": "identifier",
169 "spelling": "Foo"
172 "subHeading": [
174 "kind": "identifier",
175 "spelling": "Foo"
178 "title": "Foo"
180 "pathComponents": [
181 "Foo"
185 "accessLevel": "public",
186 "declarationFragments": [
188 "kind": "keyword",
189 "spelling": "class"
192 "kind": "text",
193 "spelling": " "
196 "kind": "identifier",
197 "spelling": "Bar"
200 "kind": "text",
201 "spelling": ";"
204 "identifier": {
205 "interfaceLanguage": "c++",
206 "precise": "c:@S@Bar"
208 "kind": {
209 "displayName": "Class",
210 "identifier": "c++.class"
212 "location": {
213 "position": {
214 "character": 7,
215 "line": 5
217 "uri": "file://INPUT_DIR/input.h"
219 "names": {
220 "navigator": [
222 "kind": "identifier",
223 "spelling": "Bar"
226 "subHeading": [
228 "kind": "identifier",
229 "spelling": "Bar"
232 "title": "Bar"
234 "pathComponents": [
235 "Bar"
239 "accessLevel": "public",
240 "declarationFragments": [
242 "kind": "keyword",
243 "spelling": "class"
246 "kind": "text",
247 "spelling": " "
250 "kind": "identifier",
251 "spelling": "FooBar"
254 "kind": "text",
255 "spelling": ";"
258 "identifier": {
259 "interfaceLanguage": "c++",
260 "precise": "c:@S@FooBar"
262 "kind": {
263 "displayName": "Class",
264 "identifier": "c++.class"
266 "location": {
267 "position": {
268 "character": 7,
269 "line": 7
271 "uri": "file://INPUT_DIR/input.h"
273 "names": {
274 "navigator": [
276 "kind": "identifier",
277 "spelling": "FooBar"
280 "subHeading": [
282 "kind": "identifier",
283 "spelling": "FooBar"
286 "title": "FooBar"
288 "pathComponents": [
289 "FooBar"