3 // RUN: split-file %s %t
4 // RUN: sed -e "s@INPUT_DIR@%{/t:regex_replacement}@g" \
5 // RUN: %t/reference.output.json.in >> %t/reference.output.json
6 // RUN: %clang_cc1 %t/main.c --emit-symbol-graph=%t/SymbolGraphs --product-name=basicfile -triple=x86_64-apple-macosx12.0.0
8 // Generator version is not consistent across test runs, normalize it.
9 // RUN: sed -e "s@\"generator\": \".*\"@\"generator\": \"?\"@g" \
10 // RUN: %t/SymbolGraphs/main.json >> %t/output-normalized.json
11 // RUN: diff %t/reference.output.json %t/output-normalized.json
14 // CHECK-NOT: warning:
26 //--- reference.output.json.in
39 "architecture": "x86_64",
49 "accessLevel": "public",
50 "declarationFragments": [
52 "kind": "typeIdentifier",
53 "preciseIdentifier": "c:I",
69 "functionSignature": {
72 "kind": "typeIdentifier",
73 "preciseIdentifier": "c:I",
79 "interfaceLanguage": "c",
80 "precise": "c:@F@main"
83 "displayName": "Function",
84 "identifier": "c.func"
91 "uri": "file://INPUT_DIR/main.c"
102 "kind": "identifier",
113 "accessLevel": "public",
114 "declarationFragments": [
117 "spelling": "#define"
124 "kind": "identifier",
125 "spelling": "TESTMACRO1"
129 "interfaceLanguage": "c",
130 "precise": "c:main.c@8@macro@TESTMACRO1"
133 "displayName": "Macro",
134 "identifier": "c.macro"
141 "uri": "file://INPUT_DIR/main.c"
146 "kind": "identifier",
147 "spelling": "TESTMACRO1"
152 "kind": "identifier",
153 "spelling": "TESTMACRO1"
156 "title": "TESTMACRO1"
163 "accessLevel": "public",
164 "declarationFragments": [
167 "spelling": "#define"
174 "kind": "identifier",
175 "spelling": "TESTMARCRO2"
179 "interfaceLanguage": "c",
180 "precise": "c:main.c@29@macro@TESTMARCRO2"
183 "displayName": "Macro",
184 "identifier": "c.macro"
191 "uri": "file://INPUT_DIR/main.c"
196 "kind": "identifier",
197 "spelling": "TESTMARCRO2"
202 "kind": "identifier",
203 "spelling": "TESTMARCRO2"
206 "title": "TESTMARCRO2"