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
15 template<typename T
> void Bar(T Fizz
);
18 /// expected-no-diagnostics
20 //--- reference.output.json.in
33 "architecture": "arm64",
48 "source": "c:@S@Foo@FT@>1#TBar#t0.0#v#",
50 "targetFallback": "Foo"
55 "accessLevel": "public",
56 "declarationFragments": [
75 "interfaceLanguage": "c++",
79 "displayName": "Class",
80 "identifier": "c++.class"
87 "uri": "file://INPUT_DIR/input.h"
109 "accessLevel": "private",
110 "declarationFragments": [
113 "spelling": "template"
121 "spelling": "typename"
128 "kind": "genericParameter",
136 "kind": "typeIdentifier",
137 "preciseIdentifier": "c:v",
145 "kind": "identifier",
153 "kind": "typeIdentifier",
154 "preciseIdentifier": "c:t0.0",
162 "kind": "internalParam",
170 "functionSignature": {
173 "declarationFragments": [
175 "kind": "typeIdentifier",
176 "preciseIdentifier": "c:t0.0",
184 "kind": "internalParam",
193 "kind": "typeIdentifier",
194 "preciseIdentifier": "c:v",
200 "interfaceLanguage": "c++",
201 "precise": "c:@S@Foo@FT@>1#TBar#t0.0#v#"
204 "displayName": "Method Template",
205 "identifier": "c++.method"
212 "uri": "file://INPUT_DIR/input.h"
217 "kind": "identifier",
223 "kind": "identifier",