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 --pretty-sgf -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 X
, typename Y
> int Foo
= 0;
16 template<typename Z
> int Foo
<int, Z
> = 0;
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",
75 "spelling": "typename"
82 "kind": "genericParameter",
90 "kind": "typeIdentifier",
91 "preciseIdentifier": "c:I",
108 "interfaceLanguage": "c++",
112 "displayName": "Global Variable Template",
113 "identifier": "c++.var"
120 "uri": "file://INPUT_DIR/input.h"
125 "kind": "identifier",
131 "kind": "identifier",
156 "accessLevel": "public",
157 "declarationFragments": [
160 "spelling": "template"
168 "spelling": "typename"
175 "kind": "genericParameter",
183 "kind": "typeIdentifier",
184 "preciseIdentifier": "c:I",
192 "kind": "identifier",
200 "kind": "typeIdentifier",
201 "preciseIdentifier": "c:I",
209 "kind": "typeIdentifier",
210 "preciseIdentifier": "c:t0.0",
219 "interfaceLanguage": "c++",
220 "precise": "c:@VP>1#T@Foo>#I#t0.0"
223 "displayName": "Global Variable Template Partial Specialization",
224 "identifier": "c++.var"
231 "uri": "file://INPUT_DIR/input.h"
236 "kind": "identifier",
242 "kind": "identifier",