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
> static T Bar
;
18 /// expected-no-diagnostics
20 //--- reference.output.json.in
33 "architecture": "arm64",
48 "source": "c:@S@Foo@Bar",
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",
144 "kind": "typeIdentifier",
145 "preciseIdentifier": "c:t0.0",
153 "kind": "identifier",
162 "interfaceLanguage": "c++",
163 "precise": "c:@S@Foo@Bar"
166 "displayName": "Template Property",
167 "identifier": "c++.property"
174 "uri": "file://INPUT_DIR/input.h"
179 "kind": "identifier",
185 "kind": "identifier",