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
16 explicit operator double();
18 /// expected-no-diagnostics
20 //--- reference.output.json.in
33 "architecture": "arm64",
48 "source": "c:@S@Foo@F@operator int#",
50 "targetFallback": "Foo"
54 "source": "c:@S@Foo@F@operator double#",
56 "targetFallback": "Foo"
61 "accessLevel": "public",
62 "declarationFragments": [
81 "interfaceLanguage": "c++",
85 "displayName": "Class",
86 "identifier": "c++.class"
93 "uri": "file://INPUT_DIR/input.h"
104 "kind": "identifier",
115 "accessLevel": "private",
116 "declarationFragments": [
119 "spelling": "operator"
126 "kind": "typeIdentifier",
134 "functionSignature": {
137 "kind": "typeIdentifier",
138 "preciseIdentifier": "c:I",
144 "interfaceLanguage": "c++",
145 "precise": "c:@S@Foo@F@operator int#"
148 "displayName": "Instance Method",
149 "identifier": "c++.method"
156 "uri": "file://INPUT_DIR/input.h"
161 "kind": "identifier",
162 "spelling": "operator int"
167 "kind": "identifier",
171 "title": "operator int"
179 "accessLevel": "private",
180 "declarationFragments": [
183 "spelling": "explicit"
191 "spelling": "operator"
198 "kind": "typeIdentifier",
206 "functionSignature": {
209 "kind": "typeIdentifier",
210 "preciseIdentifier": "c:d",
216 "interfaceLanguage": "c++",
217 "precise": "c:@S@Foo@F@operator double#"
220 "displayName": "Instance Method",
221 "identifier": "c++.method"
228 "uri": "file://INPUT_DIR/input.h"
233 "kind": "identifier",
234 "spelling": "operator double"
239 "kind": "identifier",
243 "title": "operator double"