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 X
, typename Y
> class Foo
{};
16 template<typename Z
> class Foo
<Z
, int> {};
18 /// expected-no-diagnostics
20 //--- reference.output.json.in
33 "architecture": "arm64",
48 "accessLevel": "public",
49 "declarationFragments": [
52 "spelling": "template"
60 "spelling": "typename"
67 "kind": "genericParameter",
76 "spelling": "typename"
83 "kind": "genericParameter",
108 "interfaceLanguage": "c++",
109 "precise": "c:@ST>2#T#T@Foo"
112 "displayName": "Class",
113 "identifier": "c++.class"
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",
191 "kind": "identifier",
199 "kind": "typeIdentifier",
200 "preciseIdentifier": "c:t0.0",
208 "kind": "typeIdentifier",
209 "preciseIdentifier": "c:I",
218 "interfaceLanguage": "c++",
219 "precise": "c:@SP>1#T@Foo>#t0.0#I"
222 "displayName": "Class",
223 "identifier": "c++.class"
230 "uri": "file://INPUT_DIR/input.h"
235 "kind": "identifier",
241 "kind": "identifier",