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
> class Foo
{};
16 template<> class Foo
<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",
92 "interfaceLanguage": "c++",
93 "precise": "c:@ST>1#T@Foo"
96 "displayName": "Class",
97 "identifier": "c++.class"
104 "uri": "file://INPUT_DIR/input.h"
109 "kind": "identifier",
115 "kind": "identifier",
135 "accessLevel": "public",
136 "declarationFragments": [
139 "spelling": "template"
154 "kind": "identifier",
162 "kind": "typeIdentifier",
163 "preciseIdentifier": "c:I",
172 "interfaceLanguage": "c++",
173 "precise": "c:@S@Foo>#I"
176 "displayName": "Class",
177 "identifier": "c++.class"
184 "uri": "file://INPUT_DIR/input.h"
189 "kind": "identifier",
195 "kind": "identifier",