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<typename T
> T
Fizz(int Buzz
);
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"
193 "spelling": "typename"
200 "kind": "genericParameter",
208 "kind": "typeIdentifier",
209 "preciseIdentifier": "c:t0.0",
217 "kind": "identifier",
225 "kind": "typeIdentifier",
226 "preciseIdentifier": "c:I",
234 "kind": "internalParam",
242 "functionSignature": {
245 "declarationFragments": [
247 "kind": "typeIdentifier",
248 "preciseIdentifier": "c:I",
256 "kind": "internalParam",
265 "kind": "typeIdentifier",
266 "preciseIdentifier": "c:t0.0",
272 "interfaceLanguage": "c++",
273 "precise": "c:@FT@>1#TFizz#I#t0.0#"
276 "displayName": "Function Template",
277 "identifier": "c++.func"
284 "uri": "file://INPUT_DIR/input.h"
289 "kind": "identifier",
295 "kind": "identifier",