2020-10-13 06:10:04 +08:00
|
|
|
# RUN: clangd -lit-test < %s | FileCheck -strict-whitespace %s
|
|
|
|
{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{},"trace":"off"}}
|
|
|
|
---
|
|
|
|
{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"test:///main.cpp","languageId":"cpp","version":1,"text":"void func() {}"}}}
|
|
|
|
---
|
|
|
|
{"jsonrpc":"2.0","id":1,"method":"$/memoryUsage","params":{}}
|
|
|
|
# CHECK: "id": 1,
|
|
|
|
# CHECK-NEXT: "jsonrpc": "2.0",
|
|
|
|
# CHECK-NEXT: "result": {
|
|
|
|
# CHECK-NEXT: "_self": {{[0-9]+}},
|
|
|
|
# CHECK-NEXT: "_total": {{[0-9]+}},
|
|
|
|
# CHECK-NEXT: "clangd_server": {
|
|
|
|
# CHECK-NEXT: "_self": {{[0-9]+}},
|
|
|
|
# CHECK-NEXT: "_total": {{[0-9]+}},
|
|
|
|
# CHECK-NEXT: "dynamic_index": {
|
|
|
|
# CHECK-NEXT: "_self": {{[0-9]+}},
|
|
|
|
# CHECK-NEXT: "_total": {{[0-9]+}},
|
|
|
|
# CHECK-NEXT: "main_file": {
|
|
|
|
# CHECK-NEXT: "_self": {{[0-9]+}},
|
|
|
|
# CHECK-NEXT: "_total": {{[0-9]+}},
|
|
|
|
# CHECK-NEXT: "index": {
|
|
|
|
# CHECK-NEXT: "_self": {{[0-9]+}},
|
|
|
|
# CHECK-NEXT: "_total": {{[0-9]+}}
|
|
|
|
# CHECK-NEXT: },
|
2020-10-19 18:33:35 +08:00
|
|
|
# CHECK-NEXT: "slabs": {
|
2021-03-06 15:44:05 +08:00
|
|
|
# CHECK-NEXT: "_self": {{[0-9]+}},
|
|
|
|
# CHECK-NEXT: "_total": {{[0-9]+}},
|
|
|
|
# CHECK-NEXT: "test:///main.cpp": {
|
2020-10-13 06:10:04 +08:00
|
|
|
# CHECK-NEXT: "_self": {{[0-9]+}},
|
|
|
|
# CHECK-NEXT: "_total": {{[0-9]+}},
|
|
|
|
# CHECK-NEXT: "references": {
|
|
|
|
# CHECK-NEXT: "_self": {{[0-9]+}},
|
|
|
|
# CHECK-NEXT: "_total": {{[0-9]+}}
|
|
|
|
# CHECK-NEXT: },
|
|
|
|
# CHECK-NEXT: "relations": {
|
|
|
|
# CHECK-NEXT: "_self": {{[0-9]+}},
|
|
|
|
# CHECK-NEXT: "_total": {{[0-9]+}}
|
|
|
|
# CHECK-NEXT: },
|
|
|
|
# CHECK-NEXT: "symbols": {
|
|
|
|
# CHECK-NEXT: "_self": {{[0-9]+}},
|
|
|
|
# CHECK-NEXT: "_total": {{[0-9]+}}
|
|
|
|
# CHECK-NEXT: }
|
2021-03-06 15:44:05 +08:00
|
|
|
# CHECK-NEXT: }
|
2020-10-13 06:10:04 +08:00
|
|
|
# CHECK-NEXT: }
|
|
|
|
# CHECK-NEXT: },
|
|
|
|
# CHECK-NEXT: "preamble": {
|
|
|
|
# CHECK-NEXT: "_self": {{[0-9]+}},
|
|
|
|
# CHECK-NEXT: "_total": {{[0-9]+}},
|
|
|
|
# CHECK-NEXT: "index": {
|
|
|
|
# CHECK-NEXT: "_self": {{[0-9]+}},
|
|
|
|
# CHECK-NEXT: "_total": {{[0-9]+}}
|
|
|
|
# CHECK-NEXT: },
|
2020-10-19 18:33:35 +08:00
|
|
|
# CHECK-NEXT: "slabs": {
|
2020-10-13 06:10:04 +08:00
|
|
|
# CHECK-NEXT: "_self": {{[0-9]+}},
|
|
|
|
# CHECK-NEXT: "_total": {{[0-9]+}}
|
|
|
|
# CHECK-NEXT: }
|
|
|
|
# CHECK-NEXT: }
|
|
|
|
# CHECK-NEXT: },
|
|
|
|
# CHECK-NEXT: "tuscheduler": {
|
|
|
|
# CHECK-NEXT: "{{.*}}main.cpp": {
|
|
|
|
# CHECK-NEXT: "_self": {{[0-9]+}},
|
|
|
|
# CHECK-NEXT: "_total": {{[0-9]+}},
|
|
|
|
# CHECK-NEXT: "ast": {
|
|
|
|
# CHECK-NEXT: "_self": {{[0-9]+}},
|
|
|
|
# CHECK-NEXT: "_total": {{[0-9]+}}
|
|
|
|
# CHECK-NEXT: },
|
|
|
|
# CHECK-NEXT: "preamble": {
|
|
|
|
# CHECK-NEXT: "_self": {{[0-9]+}},
|
|
|
|
# CHECK-NEXT: "_total": {{[0-9]+}}
|
|
|
|
# CHECK-NEXT: }
|
|
|
|
# CHECK-NEXT: },
|
|
|
|
# CHECK-NEXT: "_self": {{[0-9]+}},
|
2021-02-24 09:43:53 +08:00
|
|
|
# CHECK-NEXT: "_total": {{[0-9]+}},
|
|
|
|
# CHECK-NEXT: "header_includer_cache": {
|
|
|
|
# CHECK-NEXT: "_self": {{[0-9]+}},
|
|
|
|
# CHECK-NEXT: "_total": {{[0-9]+}}
|
|
|
|
# CHECK-NEXT: }
|
2020-10-13 06:10:04 +08:00
|
|
|
# CHECK-NEXT: }
|
|
|
|
# CHECK-NEXT: }
|
|
|
|
# CHECK-NEXT: }
|
|
|
|
---
|
|
|
|
{"jsonrpc":"2.0","id":3,"method":"shutdown"}
|
|
|
|
---
|
|
|
|
{"jsonrpc":"2.0","method":"exit"}
|
|
|
|
|