Skip to content

Commit 9d98acb

Browse files
committed
Renormalize line endings whitespace only after dccebdd
Line ending policies were changed in the parent, dccebdd. To make it easier to resolve downstream merge conflicts after line-ending policies are adjusted this is a separate whitespace-only commit. If you have merge conflicts as a result, you can simply `git add --renormalize -u && git merge --continue` or `git add --renormalize -u && git rebase --continue` - depending on your workflow.
1 parent dccebdd commit 9d98acb

File tree

120 files changed

+14283
-14283
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+14283
-14283
lines changed
Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
# RUN: clangd -pretty -sync -input-mirror-file %t < %s
2-
# Note that we have to use '-b' as -input-mirror-file does not have a newline at the end of file.
3-
# RUN: diff -b %t %s
4-
# It is absolutely vital that this file has CRLF line endings.
5-
#
6-
Content-Length: 125
7-
8-
{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{},"trace":"off"}}
9-
Content-Length: 172
10-
11-
{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"test:///main.cpp","languageId":"cpp","version":1,"text":"int main() {\nint a;\na;\n}\n"}}}
12-
Content-Length: 44
13-
14-
{"jsonrpc":"2.0","id":3,"method":"shutdown"}
15-
Content-Length: 33
16-
17-
{"jsonrpc":"2.0","method":"exit"}
1+
# RUN: clangd -pretty -sync -input-mirror-file %t < %s
2+
# Note that we have to use '-b' as -input-mirror-file does not have a newline at the end of file.
3+
# RUN: diff -b %t %s
4+
# It is absolutely vital that this file has CRLF line endings.
5+
#
6+
Content-Length: 125
7+
8+
{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{},"trace":"off"}}
9+
Content-Length: 172
10+
11+
{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"test:///main.cpp","languageId":"cpp","version":1,"text":"int main() {\nint a;\na;\n}\n"}}}
12+
Content-Length: 44
13+
14+
{"jsonrpc":"2.0","id":3,"method":"shutdown"}
15+
Content-Length: 33
16+
17+
{"jsonrpc":"2.0","method":"exit"}
Lines changed: 113 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -1,113 +1,113 @@
1-
# RUN: not clangd -pretty -sync -enable-test-uri-scheme < %s | FileCheck -strict-whitespace %s
2-
# RUN: not clangd -pretty -sync -enable-test-uri-scheme < %s 2>&1 | FileCheck -check-prefix=STDERR %s
3-
# vim: fileformat=dos
4-
# It is absolutely vital that this file has CRLF line endings.
5-
#
6-
# Note that we invert the test because we intent to let clangd exit prematurely.
7-
#
8-
# Test protocol parsing
9-
Content-Length: 125
10-
Content-Type: application/vscode-jsonrpc; charset-utf-8
11-
12-
{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{},"trace":"off"}}
13-
# Test message with Content-Type after Content-Length
14-
#
15-
# CHECK: "jsonrpc": "2.0",
16-
# CHECK-NEXT: "result": {
17-
# CHECK: }
18-
Content-Length: 246
19-
20-
{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"test:///main.cpp","languageId":"cpp","version":1,"text":"struct fake { int a, bb, ccc; int f(int i, const float f) const; };\nint main() {\n fake f;\n f.\n}\n"}}}
21-
22-
Content-Length: 104
23-
24-
{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"test:///main.cpp"}}}
25-
26-
Content-Type: application/vscode-jsonrpc; charset-utf-8
27-
Content-Length: 146
28-
29-
{"jsonrpc":"2.0","id":1,"method":"textDocument/completion","params":{"textDocument":{"uri":"test:/main.cpp"},"position":{"line":3,"character":5}}}
30-
# Test message with Content-Type before Content-Length
31-
#
32-
# CHECK: "id": 1,
33-
# CHECK-NEXT: "jsonrpc": "2.0",
34-
# CHECK-NEXT: "result": {
35-
# CHECK-NEXT: "isIncomplete": false,
36-
# CHECK-NEXT: "items": [
37-
# CHECK: "filterText": "a",
38-
# CHECK-NEXT: "insertText": "a",
39-
# CHECK-NEXT: "insertTextFormat": 1,
40-
# CHECK-NEXT: "kind": 5,
41-
# CHECK-NEXT: "label": " a",
42-
# CHECK-NEXT: "score": {{[0-9]+.[0-9]+}},
43-
# CHECK-NEXT: "sortText": "{{.*}}"
44-
# CHECK: ]
45-
# CHECK-NEXT: }
46-
47-
X-Test: Testing
48-
Content-Type: application/vscode-jsonrpc; charset-utf-8
49-
Content-Length: 146
50-
Content-Type: application/vscode-jsonrpc; charset-utf-8
51-
X-Testing: Test
52-
53-
{"jsonrpc":"2.0","id":2,"method":"textDocument/completion","params":{"textDocument":{"uri":"test:/main.cpp"},"position":{"line":3,"character":5}}}
54-
55-
Content-Type: application/vscode-jsonrpc; charset-utf-8
56-
Content-Length: 10
57-
Content-Length: 146
58-
59-
{"jsonrpc":"2.0","id":3,"method":"textDocument/completion","params":{"textDocument":{"uri":"test:/main.cpp"},"position":{"line":3,"character":5}}}
60-
# Test message with duplicate Content-Length headers
61-
#
62-
# CHECK: "id": 3,
63-
# CHECK-NEXT: "jsonrpc": "2.0",
64-
# CHECK-NEXT: "result": {
65-
# CHECK-NEXT: "isIncomplete": false,
66-
# CHECK-NEXT: "items": [
67-
# CHECK: "filterText": "a",
68-
# CHECK-NEXT: "insertText": "a",
69-
# CHECK-NEXT: "insertTextFormat": 1,
70-
# CHECK-NEXT: "kind": 5,
71-
# CHECK-NEXT: "label": " a",
72-
# CHECK-NEXT: "score": {{[0-9]+.[0-9]+}},
73-
# CHECK-NEXT: "sortText": "{{.*}}"
74-
# CHECK: ]
75-
# CHECK-NEXT: }
76-
# STDERR: Warning: Duplicate Content-Length header received. The previous value for this message (10) was ignored.
77-
78-
Content-Type: application/vscode-jsonrpc; charset-utf-8
79-
Content-Length: 10
80-
81-
{"jsonrpc":"2.0","id":4,"method":"textDocument/completion","params":{"textDocument":{"uri":"test:/main.cpp"},"position":{"line":3,"character":5}}}
82-
# Test message with malformed Content-Length
83-
#
84-
# STDERR: JSON parse error
85-
# Ensure we recover by sending another (valid) message
86-
87-
Content-Length: 146
88-
89-
{"jsonrpc":"2.0","id":5,"method":"textDocument/completion","params":{"textDocument":{"uri":"test:/main.cpp"},"position":{"line":3,"character":5}}}
90-
# Test message with Content-Type before Content-Length
91-
#
92-
# CHECK: "id": 5,
93-
# CHECK-NEXT: "jsonrpc": "2.0",
94-
# CHECK-NEXT: "result": {
95-
# CHECK-NEXT: "isIncomplete": false,
96-
# CHECK-NEXT: "items": [
97-
# CHECK: "filterText": "a",
98-
# CHECK-NEXT: "insertText": "a",
99-
# CHECK-NEXT: "insertTextFormat": 1,
100-
# CHECK-NEXT: "kind": 5,
101-
# CHECK-NEXT: "label": " a",
102-
# CHECK-NEXT: "score": {{[0-9]+.[0-9]+}},
103-
# CHECK-NEXT: "sortText": "{{.*}}"
104-
# CHECK: ]
105-
# CHECK-NEXT: }
106-
Content-Length: 1024
107-
108-
{"jsonrpc":"2.0","id":5,"method":"textDocument/completion","params":{"textDocument":{"uri":"test:/main.cpp"},"position":{"line":3,"character":5}}}
109-
# Test message which reads beyond the end of the stream.
110-
#
111-
# Ensure this is the last test in the file!
112-
# STDERR: Input was aborted. Read only {{[0-9]+}} bytes of expected {{[0-9]+}}.
113-
1+
# RUN: not clangd -pretty -sync -enable-test-uri-scheme < %s | FileCheck -strict-whitespace %s
2+
# RUN: not clangd -pretty -sync -enable-test-uri-scheme < %s 2>&1 | FileCheck -check-prefix=STDERR %s
3+
# vim: fileformat=dos
4+
# It is absolutely vital that this file has CRLF line endings.
5+
#
6+
# Note that we invert the test because we intent to let clangd exit prematurely.
7+
#
8+
# Test protocol parsing
9+
Content-Length: 125
10+
Content-Type: application/vscode-jsonrpc; charset-utf-8
11+
12+
{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{},"trace":"off"}}
13+
# Test message with Content-Type after Content-Length
14+
#
15+
# CHECK: "jsonrpc": "2.0",
16+
# CHECK-NEXT: "result": {
17+
# CHECK: }
18+
Content-Length: 246
19+
20+
{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"test:///main.cpp","languageId":"cpp","version":1,"text":"struct fake { int a, bb, ccc; int f(int i, const float f) const; };\nint main() {\n fake f;\n f.\n}\n"}}}
21+
22+
Content-Length: 104
23+
24+
{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"test:///main.cpp"}}}
25+
26+
Content-Type: application/vscode-jsonrpc; charset-utf-8
27+
Content-Length: 146
28+
29+
{"jsonrpc":"2.0","id":1,"method":"textDocument/completion","params":{"textDocument":{"uri":"test:/main.cpp"},"position":{"line":3,"character":5}}}
30+
# Test message with Content-Type before Content-Length
31+
#
32+
# CHECK: "id": 1,
33+
# CHECK-NEXT: "jsonrpc": "2.0",
34+
# CHECK-NEXT: "result": {
35+
# CHECK-NEXT: "isIncomplete": false,
36+
# CHECK-NEXT: "items": [
37+
# CHECK: "filterText": "a",
38+
# CHECK-NEXT: "insertText": "a",
39+
# CHECK-NEXT: "insertTextFormat": 1,
40+
# CHECK-NEXT: "kind": 5,
41+
# CHECK-NEXT: "label": " a",
42+
# CHECK-NEXT: "score": {{[0-9]+.[0-9]+}},
43+
# CHECK-NEXT: "sortText": "{{.*}}"
44+
# CHECK: ]
45+
# CHECK-NEXT: }
46+
47+
X-Test: Testing
48+
Content-Type: application/vscode-jsonrpc; charset-utf-8
49+
Content-Length: 146
50+
Content-Type: application/vscode-jsonrpc; charset-utf-8
51+
X-Testing: Test
52+
53+
{"jsonrpc":"2.0","id":2,"method":"textDocument/completion","params":{"textDocument":{"uri":"test:/main.cpp"},"position":{"line":3,"character":5}}}
54+
55+
Content-Type: application/vscode-jsonrpc; charset-utf-8
56+
Content-Length: 10
57+
Content-Length: 146
58+
59+
{"jsonrpc":"2.0","id":3,"method":"textDocument/completion","params":{"textDocument":{"uri":"test:/main.cpp"},"position":{"line":3,"character":5}}}
60+
# Test message with duplicate Content-Length headers
61+
#
62+
# CHECK: "id": 3,
63+
# CHECK-NEXT: "jsonrpc": "2.0",
64+
# CHECK-NEXT: "result": {
65+
# CHECK-NEXT: "isIncomplete": false,
66+
# CHECK-NEXT: "items": [
67+
# CHECK: "filterText": "a",
68+
# CHECK-NEXT: "insertText": "a",
69+
# CHECK-NEXT: "insertTextFormat": 1,
70+
# CHECK-NEXT: "kind": 5,
71+
# CHECK-NEXT: "label": " a",
72+
# CHECK-NEXT: "score": {{[0-9]+.[0-9]+}},
73+
# CHECK-NEXT: "sortText": "{{.*}}"
74+
# CHECK: ]
75+
# CHECK-NEXT: }
76+
# STDERR: Warning: Duplicate Content-Length header received. The previous value for this message (10) was ignored.
77+
78+
Content-Type: application/vscode-jsonrpc; charset-utf-8
79+
Content-Length: 10
80+
81+
{"jsonrpc":"2.0","id":4,"method":"textDocument/completion","params":{"textDocument":{"uri":"test:/main.cpp"},"position":{"line":3,"character":5}}}
82+
# Test message with malformed Content-Length
83+
#
84+
# STDERR: JSON parse error
85+
# Ensure we recover by sending another (valid) message
86+
87+
Content-Length: 146
88+
89+
{"jsonrpc":"2.0","id":5,"method":"textDocument/completion","params":{"textDocument":{"uri":"test:/main.cpp"},"position":{"line":3,"character":5}}}
90+
# Test message with Content-Type before Content-Length
91+
#
92+
# CHECK: "id": 5,
93+
# CHECK-NEXT: "jsonrpc": "2.0",
94+
# CHECK-NEXT: "result": {
95+
# CHECK-NEXT: "isIncomplete": false,
96+
# CHECK-NEXT: "items": [
97+
# CHECK: "filterText": "a",
98+
# CHECK-NEXT: "insertText": "a",
99+
# CHECK-NEXT: "insertTextFormat": 1,
100+
# CHECK-NEXT: "kind": 5,
101+
# CHECK-NEXT: "label": " a",
102+
# CHECK-NEXT: "score": {{[0-9]+.[0-9]+}},
103+
# CHECK-NEXT: "sortText": "{{.*}}"
104+
# CHECK: ]
105+
# CHECK-NEXT: }
106+
Content-Length: 1024
107+
108+
{"jsonrpc":"2.0","id":5,"method":"textDocument/completion","params":{"textDocument":{"uri":"test:/main.cpp"},"position":{"line":3,"character":5}}}
109+
# Test message which reads beyond the end of the stream.
110+
#
111+
# Ensure this is the last test in the file!
112+
# STDERR: Input was aborted. Read only {{[0-9]+}} bytes of expected {{[0-9]+}}.
113+
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# RUN: not clangd -sync < %s 2>&1 | FileCheck -check-prefix=STDERR %s
2-
# vim: fileformat=dos
3-
# It is absolutely vital that this file has CRLF line endings.
4-
#
5-
Content-Length: 2147483648
6-
7-
# STDERR: Refusing to read message
1+
# RUN: not clangd -sync < %s 2>&1 | FileCheck -check-prefix=STDERR %s
2+
# vim: fileformat=dos
3+
# It is absolutely vital that this file has CRLF line endings.
4+
#
5+
Content-Length: 2147483648
6+
7+
# STDERR: Refusing to read message

0 commit comments

Comments
 (0)