1 # RUN: clangd -lit-test < %s | FileCheck -strict-whitespace %s
2 {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{},"trace":"off"}}
4 {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"languageId":"cpp","text":"void callee(int);\nvoid caller1() {\n callee(42);\n}\nvoid caller2() {\n caller1();\n caller1();\n}\nvoid caller3() {\n caller1();\n caller2();\n}\n","uri":"test:///main.cpp","version":1}}}
6 {"jsonrpc":"2.0","id":1,"method":"textDocument/prepareCallHierarchy","params":{"position":{"character":8,"line":0},"textDocument":{"uri":"test:///main.cpp"}}}
8 # CHECK-NEXT: "jsonrpc": "2.0",
9 # CHECK-NEXT: "result": [
11 # CHECK-NEXT: "data": "{{.*}}",
12 # CHECK-NEXT: "kind": 12,
13 # CHECK-NEXT: "name": "callee",
14 # CHECK-NEXT: "range": {
15 # CHECK-NEXT: "end": {
16 # CHECK-NEXT: "character": 16,
17 # CHECK-NEXT: "line": 0
19 # CHECK-NEXT: "start": {
20 # CHECK-NEXT: "character": 0,
21 # CHECK-NEXT: "line": 0
24 # CHECK-NEXT: "selectionRange": {
25 # CHECK-NEXT: "end": {
26 # CHECK-NEXT: "character": 11,
27 # CHECK-NEXT: "line": 0
29 # CHECK-NEXT: "start": {
30 # CHECK-NEXT: "character": 5,
31 # CHECK-NEXT: "line": 0
34 # CHECK-NEXT: "uri": "file://{{.*}}/clangd-test/main.cpp"
37 {"jsonrpc":"2.0","id":3,"method":"shutdown"}
39 {"jsonrpc":"2.0","method":"exit"}