Bump version to 19.1.0git
[llvm-project.git] / clang-tools-extra / clangd / test / diagnostics-no-tidy.test
blob9341275b6c2137b5733c6cf6d279f0c1a869ce42
1 # RUN: clangd -lit-test -clang-tidy=false < %s | FileCheck -strict-whitespace %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:///foo.c","languageId":"c","text":"void main() {\n(void)sizeof(42);\n}"}}}
5 #      CHECK:  "method": "textDocument/publishDiagnostics",
6 # CHECK-NEXT:  "params": {
7 # CHECK-NEXT:    "diagnostics": [
8 # CHECK-NEXT:      {
9 # CHECK-NEXT:        "code": "-Wmain-return-type",
10 # CHECK-NEXT:        "message": "Return type of 'main' is not 'int' (fix available)",
11 # CHECK-NEXT:        "range": {
12 # CHECK-NEXT:          "end": {
13 # CHECK-NEXT:            "character": 4,
14 # CHECK-NEXT:            "line": 0
15 # CHECK-NEXT:          },
16 # CHECK-NEXT:          "start": {
17 # CHECK-NEXT:            "character": 0,
18 # CHECK-NEXT:            "line": 0
19 # CHECK-NEXT:          }
20 # CHECK-NEXT:        },
21 # CHECK-NEXT:        "severity": 2,
22 # CHECK-NEXT:        "source": "clang"
23 # CHECK-NEXT:      }
24 # CHECK-NEXT:    ],
25 # CHECK-NEXT:    "uri": "file://{{.*}}/foo.c",
26 # CHECK-NEXT:    "version": 0
27 # CHECK-NEXT:  }
28 ---
29 {"jsonrpc":"2.0","id":2,"method":"sync","params":null}
30 ---
31 {"jsonrpc":"2.0","method":"textDocument/didClose","params":{"textDocument":{"uri":"test:///foo.c"}}}
32 #      CHECK:  "method": "textDocument/publishDiagnostics",
33 # CHECK-NEXT:  "params": {
34 # CHECK-NEXT:    "diagnostics": [],
35 # CHECK-NEXT:    "uri": "file://{{.*}}/foo.c"
36 # CHECK-NEXT:  }
37 ---
38 {"jsonrpc":"2.0","id":5,"method":"shutdown"}
39 ---
40 {"jsonrpc":"2.0","method":"exit"}