[clang-tools-extra] Fix a link in ReleaseNotes.rst
[llvm-project.git] / clang-tools-extra / clangd / test / diagnostics-notes.test
blob9e57cf64f96525b3aebd09fc0a19455f43785550
1 # RUN: clangd -lit-test < %s | FileCheck -strict-whitespace %s
2 {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{"textDocument":{"publishDiagnostics":{"relatedInformation":true}}},"trace":"off"}}
3 ---
4 {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"test:///foo.cc","languageId":"cpp","text":"int x;\nint x;"}}}
5 #      CHECK:  "method": "textDocument/publishDiagnostics",
6 # CHECK-NEXT:  "params": {
7 # CHECK-NEXT:    "diagnostics": [
8 # CHECK-NEXT:      {
9 # CHECK-NEXT:        "code": "redefinition",
10 # CHECK-NEXT:        "message": "Redefinition of 'x'",
11 # CHECK-NEXT:        "range": {
12 # CHECK-NEXT:          "end": {
13 # CHECK-NEXT:            "character": 5,
14 # CHECK-NEXT:            "line": 1
15 # CHECK-NEXT:          },
16 # CHECK-NEXT:          "start": {
17 # CHECK-NEXT:            "character": 4,
18 # CHECK-NEXT:            "line": 1
19 # CHECK-NEXT:          }
20 # CHECK-NEXT:        },
21 # CHECK-NEXT:        "relatedInformation": [
22 # CHECK-NEXT:          {
23 # CHECK-NEXT:            "location": {
24 # CHECK-NEXT:              "range": {
25 # CHECK-NEXT:                "end": {
26 # CHECK-NEXT:                  "character": 5,
27 # CHECK-NEXT:                  "line": 0
28 # CHECK-NEXT:                },
29 # CHECK-NEXT:                "start": {
30 # CHECK-NEXT:                  "character": 4,
31 # CHECK-NEXT:                  "line": 0
32 # CHECK-NEXT:                }
33 # CHECK-NEXT:              },
34 # CHECK-NEXT:              "uri": "{{.*}}foo.cc"
35 # CHECK-NEXT:            },
36 # CHECK-NEXT:            "message": "Previous definition is here"
37 # CHECK-NEXT:          }
38 # CHECK-NEXT:        ],
39 # CHECK-NEXT:        "severity": 1,
40 # CHECK-NEXT:        "source": "clang"
41 # CHECK-NEXT:      }
42 # CHECK-NEXT:    ],
43 # CHECK-NEXT:    "uri": "file://{{.*}}/foo.cc",
44 # CHECK-NEXT:    "version": 0
45 # CHECK-NEXT:  }
46 ---
47 {"jsonrpc":"2.0","id":5,"method":"shutdown"}
48 ---
49 {"jsonrpc":"2.0","method":"exit"}