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 T
> T Foo
= T(3.14);
16 template<> int Foo
<int>;
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:t0.0",
92 "interfaceLanguage": "c++",
96 "displayName": "Global Variable Template",
97 "identifier": "c++.var"
104 "uri": "file://INPUT_DIR/input.h"
109 "kind": "identifier",
115 "kind": "identifier",
135 "accessLevel": "public",
136 "declarationFragments": [
139 "spelling": "template"
146 "kind": "typeIdentifier",
147 "preciseIdentifier": "c:I",
155 "kind": "identifier",
163 "kind": "typeIdentifier",
164 "preciseIdentifier": "c:I",
173 "interfaceLanguage": "c++",
174 "precise": "c:@Foo>#I"
177 "displayName": "Global Variable Template Specialization",
178 "identifier": "c++.var"
185 "uri": "file://INPUT_DIR/input.h"
190 "kind": "identifier",
196 "kind": "identifier",