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);
15 /// expected-no-diagnostics
17 //--- reference.output.json.in
30 "architecture": "arm64",
45 "accessLevel": "public",
46 "declarationFragments": [
49 "spelling": "template"
57 "spelling": "typename"
64 "kind": "genericParameter",
72 "kind": "typeIdentifier",
73 "preciseIdentifier": "c:t0.0",
90 "interfaceLanguage": "c++",
94 "displayName": "Global Variable Template",
95 "identifier": "c++.var"
102 "uri": "file://INPUT_DIR/input.h"
107 "kind": "identifier",
113 "kind": "identifier",