Bump version to 19.1.0git
[llvm-project.git] / clang-tools-extra / clangd / test / ast-no-range.test
blob34adffefc91f7eea2a5de5681391e11556ca923a
1 # RUN: clangd -lit-test < %s | FileCheck %s
2 {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{},"trace":"off"}}
3 ---
4 {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"test:///simple.cpp","languageId":"cpp","version":1,"text":"int x;"}}}
5 ---
6 {"jsonrpc":"2.0","id":1,"method":"textDocument/ast","params":{"textDocument":{"uri":"test:///simple.cpp"}}}
7 #      CHECK:  "id": 1,
8 # CHECK-NEXT:  "jsonrpc": "2.0",
9 # CHECK-NEXT:  "result": {
10 # CHECK-NEXT:    "arcana": "{{TranslationUnitDecl.*}}"
11 # CHECK-NEXT:    "children": [
12 # CHECK-NEXT:      {
13 #      CHECK:        "arcana": "VarDecl {{.*}} x 'int'",
14 # CHECK-NEXT:        "children": [
15 # CHECK-NEXT:          {
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
23 # CHECK-NEXT:              },
24 # CHECK-NEXT:              "start": {
25 # CHECK-NEXT:                "character": 0,
26 # CHECK-NEXT:                "line": 0
27 # CHECK-NEXT:              }
28 # CHECK-NEXT:            },
29 # CHECK-NEXT:            "role": "type"
30 # CHECK-NEXT:          }
31 # CHECK-NEXT:        ],
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
38 # CHECK-NEXT:          },
39 # CHECK-NEXT:          "start": {
40 # CHECK-NEXT:            "character": 0,
41 # CHECK-NEXT:            "line": 0
42 # CHECK-NEXT:          }
43 # CHECK-NEXT:        },
44 # CHECK-NEXT:        "role": "declaration"
45 # CHECK-NEXT:      }
46 # CHECK-NEXT:    ],
47 # CHECK-NEXT:    "kind": "TranslationUnit",
48 # CHECK-NEXT:    "role": "declaration"
49 # CHECK-NEXT:  }
50 ---
51 {"jsonrpc":"2.0","id":2,"method":"shutdown"}
52 ---
53 {"jsonrpc":"2.0","method":"exit"}