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
15 template<typename T
> void Bar(T Fizz
);
17 template<> void Bar
<int>(int Fizz
);
20 /// expected-no-diagnostics
22 //--- reference.output.json.in
35 "architecture": "arm64",
50 "source": "c:@S@Foo@FT@>1#TBar#t0.0#v#",
52 "targetFallback": "Foo"
56 "source": "c:@S@Foo@F@Bar<#I>#I#",
58 "targetFallback": "Foo"
63 "accessLevel": "public",
64 "declarationFragments": [
83 "interfaceLanguage": "c++",
87 "displayName": "Class",
88 "identifier": "c++.class"
95 "uri": "file://INPUT_DIR/input.h"
100 "kind": "identifier",
106 "kind": "identifier",
117 "accessLevel": "private",
118 "declarationFragments": [
121 "spelling": "template"
129 "spelling": "typename"
136 "kind": "genericParameter",
144 "kind": "typeIdentifier",
145 "preciseIdentifier": "c:v",
153 "kind": "identifier",
161 "kind": "typeIdentifier",
162 "preciseIdentifier": "c:t0.0",
170 "kind": "internalParam",
178 "functionSignature": {
181 "declarationFragments": [
183 "kind": "typeIdentifier",
184 "preciseIdentifier": "c:t0.0",
192 "kind": "internalParam",
201 "kind": "typeIdentifier",
202 "preciseIdentifier": "c:v",
208 "interfaceLanguage": "c++",
209 "precise": "c:@S@Foo@FT@>1#TBar#t0.0#v#"
212 "displayName": "Method Template",
213 "identifier": "c++.method"
220 "uri": "file://INPUT_DIR/input.h"
225 "kind": "identifier",
231 "kind": "identifier",
252 "accessLevel": "private",
253 "declarationFragments": [
256 "spelling": "template"
263 "kind": "typeIdentifier",
264 "preciseIdentifier": "c:v",
272 "kind": "identifier",
280 "kind": "typeIdentifier",
281 "preciseIdentifier": "c:I",
289 "kind": "typeIdentifier",
290 "preciseIdentifier": "c:I",
298 "kind": "internalParam",
306 "functionSignature": {
309 "declarationFragments": [
311 "kind": "typeIdentifier",
312 "preciseIdentifier": "c:I",
320 "kind": "internalParam",
329 "kind": "typeIdentifier",
330 "preciseIdentifier": "c:v",
336 "interfaceLanguage": "c++",
337 "precise": "c:@S@Foo@F@Bar<#I>#I#"
340 "displayName": "Method Template Specialization",
341 "identifier": "c++.method"
348 "uri": "file://INPUT_DIR/input.h"
353 "kind": "identifier",
359 "kind": "identifier",