1 # RUN: clangd -lit-test < %s | FileCheck %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":{"uri":"test:///simple.cpp","languageId":"cpp","version":1,"text":"int x;"}}}
6 {"jsonrpc":"2.0","id":1,"method":"textDocument/ast","params":{
7 "textDocument":{"uri":"test:///simple.cpp"},
8 "range": {"start": {"line":0, "character":0}, "end": {"line":0, "character":5}}
11 # CHECK-NEXT: "jsonrpc": "2.0",
12 # CHECK-NEXT: "result": {
13 # CHECK-NEXT: "arcana": "VarDecl {{.*}} x 'int'",
14 # CHECK-NEXT: "children": [
16 # CHECK-NEXT: "arcana": "QualType {{.*}} 'int' ",
17 # CHECK-NEXT: "detail": "int",
18 # CHECK-NEXT: "kind": "Builtin",
19 # CHECK-NEXT: "range": {
20 # CHECK-NEXT: "end": {
21 # CHECK-NEXT: "character": 3,
22 # CHECK-NEXT: "line": 0
24 # CHECK-NEXT: "start": {
25 # CHECK-NEXT: "character": 0,
26 # CHECK-NEXT: "line": 0
29 # CHECK-NEXT: "role": "type"
32 # CHECK-NEXT: "detail": "x",
33 # CHECK-NEXT: "kind": "Var",
34 # CHECK-NEXT: "range": {
35 # CHECK-NEXT: "end": {
36 # CHECK-NEXT: "character": 5,
37 # CHECK-NEXT: "line": 0
39 # CHECK-NEXT: "start": {
40 # CHECK-NEXT: "character": 0,
41 # CHECK-NEXT: "line": 0
44 # CHECK-NEXT: "role": "declaration"
47 {"jsonrpc":"2.0","id":2,"method":"shutdown"}
49 {"jsonrpc":"2.0","method":"exit"}