-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test go to definition of control variable and limit variable of cilk_…
…for loop
- Loading branch information
1 parent
876a661
commit f78505e
Showing
1 changed file
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# RUN: clangd -lit-test < %s | FileCheck %s | ||
{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{},"trace":"off","initializationOptions":{"fallbackFlags":["-fopencilk"]}}} | ||
--- | ||
{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"test:///for.c","languageId":"c","version":1,"text":"void f(int nn) {\n _Cilk_for(int ii = 99; ii < nn; ii += 1) { int jj = ii;}\n}"}}} | ||
--- | ||
{"jsonrpc":"2.0","id":1,"method":"textDocument/definition","params":{"textDocument":{"uri":"test:///for.c"},"position":{"line":1,"character":25}}} | ||
--- | ||
{"jsonrpc":"2.0","id":2,"method":"textDocument/definition","params":{"textDocument":{"uri":"test:///for.c"},"position":{"line":1,"character":31}}} | ||
--- | ||
{"jsonrpc":"2.0","id":3,"method":"textDocument/definition","params":{"textDocument":{"uri":"test:///for.c"},"position":{"line":1,"character":35}}} | ||
--- | ||
{"jsonrpc":"2.0","id":4,"method":"textDocument/definition","params":{"textDocument":{"uri":"test:///for.c"},"position":{"line":1,"character":54}}} | ||
--- | ||
{"jsonrpc":"2.0","id":2,"method":"shutdown"} | ||
--- | ||
{"jsonrpc":"2.0","method":"exit"} | ||
# Find use of control variable inside loop condition. | ||
# CHECK: "id": 1, | ||
# CHECK-NEXT: "jsonrpc": "2.0", | ||
# CHECK-NEXT: "result": [ | ||
# CHECK-NEXT: { | ||
# CHECK-NEXT: "range": { | ||
# CHECK-NEXT: "end": { | ||
# CHECK-NEXT: "character": 18, | ||
# CHECK-NEXT: "line": 1 | ||
# CHECK-NEXT: }, | ||
# CHECK-NEXT: "start": { | ||
# CHECK-NEXT: "character": 16, | ||
# CHECK-NEXT: "line": 1 | ||
# CHECK-NEXT: } | ||
# CHECK-NEXT: }, | ||
# Find use of limit variable inside loop condition. | ||
# CHECK: "id": 2, | ||
# CHECK-NEXT: "jsonrpc": "2.0", | ||
# CHECK-NEXT: "result": [ | ||
# CHECK-NEXT: { | ||
# CHECK-NEXT: "range": { | ||
# CHECK-NEXT: "end": { | ||
# CHECK-NEXT: "character": 13, | ||
# CHECK-NEXT: "line": 0 | ||
# CHECK-NEXT: }, | ||
# CHECK-NEXT: "start": { | ||
# CHECK-NEXT: "character": 11, | ||
# CHECK-NEXT: "line": 0 | ||
# CHECK-NEXT: } | ||
# CHECK-NEXT: }, | ||
# Find use of control variable inside loop increment. | ||
# CHECK: "id": 3, | ||
# CHECK-NEXT: "jsonrpc": "2.0", | ||
# CHECK-NEXT: "result": [ | ||
# CHECK-NEXT: { | ||
# CHECK-NEXT: "range": { | ||
# CHECK-NEXT: "end": { | ||
# CHECK-NEXT: "character": 18, | ||
# CHECK-NEXT: "line": 1 | ||
# CHECK-NEXT: }, | ||
# CHECK-NEXT: "start": { | ||
# CHECK-NEXT: "character": 16, | ||
# CHECK-NEXT: "line": 1 | ||
# CHECK-NEXT: } | ||
# CHECK-NEXT: }, | ||
# Find use of control variable inside loop body. | ||
# CHECK: "id": 4, | ||
# CHECK-NEXT: "jsonrpc": "2.0", | ||
# CHECK-NEXT: "result": [ | ||
# CHECK-NEXT: { | ||
# CHECK-NEXT: "range": { | ||
# CHECK-NEXT: "end": { | ||
# CHECK-NEXT: "character": 18, | ||
# CHECK-NEXT: "line": 1 | ||
# CHECK-NEXT: }, | ||
# CHECK-NEXT: "start": { | ||
# CHECK-NEXT: "character": 16, | ||
# CHECK-NEXT: "line": 1 | ||
# CHECK-NEXT: } | ||
# CHECK-NEXT: }, |