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 template<typename T
> void Foo(T Bar
);
16 template<> void Foo
<int>(int Bar
);
17 /// expected-no-diagnostics
19 //--- reference.output.json.in
32 "architecture": "arm64",
47 "accessLevel": "public",
48 "declarationFragments": [
51 "spelling": "template"
59 "spelling": "typename"
66 "kind": "genericParameter",
74 "kind": "typeIdentifier",
75 "preciseIdentifier": "c:v",
91 "kind": "typeIdentifier",
92 "preciseIdentifier": "c:t0.0",
100 "kind": "internalParam",
108 "functionSignature": {
111 "declarationFragments": [
113 "kind": "typeIdentifier",
114 "preciseIdentifier": "c:t0.0",
122 "kind": "internalParam",
131 "kind": "typeIdentifier",
132 "preciseIdentifier": "c:v",
138 "interfaceLanguage": "c++",
139 "precise": "c:@FT@>1#TFoo#t0.0#v#"
142 "displayName": "Function Template",
143 "identifier": "c++.func"
150 "uri": "file://INPUT_DIR/input.h"
155 "kind": "identifier",
161 "kind": "identifier",
181 "accessLevel": "public",
182 "declarationFragments": [
185 "spelling": "template"
192 "kind": "typeIdentifier",
193 "preciseIdentifier": "c:v",
201 "kind": "identifier",
209 "kind": "typeIdentifier",
210 "preciseIdentifier": "c:I",
218 "kind": "typeIdentifier",
219 "preciseIdentifier": "c:I",
227 "kind": "internalParam",
235 "functionSignature": {
238 "declarationFragments": [
240 "kind": "typeIdentifier",
241 "preciseIdentifier": "c:I",
249 "kind": "internalParam",
258 "kind": "typeIdentifier",
259 "preciseIdentifier": "c:v",
265 "interfaceLanguage": "c++",
266 "precise": "c:@F@Foo<#I>#I#"
269 "displayName": "Function Template Specialization",
270 "identifier": "c++.func"
277 "uri": "file://INPUT_DIR/input.h"
282 "kind": "identifier",
288 "kind": "identifier",