Skip to content

Commit ac46eea

Browse files
committed
[clang-tools-extra,test] Convert text files from CRLF to LF
Skip files with intentional CRLF line endings: test/clang-apply-replacements/crlf.cpp test/clang-apply-replacements/Inputs/crlf/crlf.cpp.expected clangd/test/input-mirror.test clangd/test/protocol.test clangd/test/too-large.test
1 parent c7ad12d commit ac46eea

File tree

10 files changed

+158
-158
lines changed

10 files changed

+158
-158
lines changed
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# RUN: clangd -input-style=delimited -sync -input-mirror-file %t < %s
2-
# RUN: grep '{"jsonrpc":"2.0","id":3,"method":"exit"}' %t
3-
#
4-
# RUN: clangd -lit-test -input-mirror-file %t < %s
5-
# RUN: grep '{"jsonrpc":"2.0","id":3,"method":"exit"}' %t
6-
#
7-
{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{},"trace":"off"}}
8-
---
9-
{"jsonrpc":"2.0","id":3,"method":"shutdown"}
10-
---
11-
{"jsonrpc":"2.0","method":"exit"}
1+
# RUN: clangd -input-style=delimited -sync -input-mirror-file %t < %s
2+
# RUN: grep '{"jsonrpc":"2.0","id":3,"method":"exit"}' %t
3+
#
4+
# RUN: clangd -lit-test -input-mirror-file %t < %s
5+
# RUN: grep '{"jsonrpc":"2.0","id":3,"method":"exit"}' %t
6+
#
7+
{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{},"trace":"off"}}
8+
---
9+
{"jsonrpc":"2.0","id":3,"method":"shutdown"}
10+
---
11+
{"jsonrpc":"2.0","method":"exit"}
Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,57 @@
1-
# RUN: clangd -lit-test < %s | FileCheck %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:///main.cpp","languageId":"cpp","version":1,"text":"void foo(); int main() { foo(); }\n"}}}
5-
---
6-
{"jsonrpc":"2.0","id":1,"method":"textDocument/hover","params":{"textDocument":{"uri":"test:///main.cpp"},"position":{"line":0,"character":27}}}
7-
# CHECK: "id": 1,
8-
# CHECK-NEXT: "jsonrpc": "2.0",
9-
# CHECK-NEXT: "result": {
10-
# CHECK-NEXT: "contents": {
11-
# CHECK-NEXT: "kind": "plaintext",
12-
# CHECK-NEXT: "value": "function foo\n\n→ void\n\nvoid foo()"
13-
# CHECK-NEXT: },
14-
# CHECK-NEXT: "range": {
15-
# CHECK-NEXT: "end": {
16-
# CHECK-NEXT: "character": 28,
17-
# CHECK-NEXT: "line": 0
18-
# CHECK-NEXT: },
19-
# CHECK-NEXT: "start": {
20-
# CHECK-NEXT: "character": 25,
21-
# CHECK-NEXT: "line": 0
22-
# CHECK-NEXT: }
23-
# CHECK-NEXT: }
24-
# CHECK-NEXT: }
25-
# CHECK-NEXT:}
26-
---
27-
{"jsonrpc":"2.0","id":1,"method":"textDocument/hover","params":{"textDocument":{"uri":"test:///main.cpp"},"position":{"line":0,"character":10}}}
28-
# CHECK: "id": 1,
29-
# CHECK-NEXT: "jsonrpc": "2.0",
30-
# CHECK-NEXT: "result": null
31-
---
32-
{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"test:///main2.cpp","languageId":"cpp","version":1,"text":"enum foo{}; int main() { foo f; }\n"}}}
33-
---
34-
{"jsonrpc":"2.0","id":1,"method":"textDocument/hover","params":{"textDocument":{"uri":"test:///main2.cpp"},"position":{"line":0,"character":27}}}
35-
# CHECK: "id": 1,
36-
# CHECK-NEXT: "jsonrpc": "2.0",
37-
# CHECK-NEXT: "result": {
38-
# CHECK-NEXT: "contents": {
39-
# CHECK-NEXT: "kind": "plaintext",
40-
# CHECK-NEXT: "value": "enum foo\n\nenum foo {}"
41-
# CHECK-NEXT: },
42-
# CHECK-NEXT: "range": {
43-
# CHECK-NEXT: "end": {
44-
# CHECK-NEXT: "character": 28,
45-
# CHECK-NEXT: "line": 0
46-
# CHECK-NEXT: },
47-
# CHECK-NEXT: "start": {
48-
# CHECK-NEXT: "character": 25,
49-
# CHECK-NEXT: "line": 0
50-
# CHECK-NEXT: }
51-
# CHECK-NEXT: }
52-
# CHECK-NEXT: }
53-
# CHECK-NEXT:}
54-
---
55-
{"jsonrpc":"2.0","id":3,"method":"shutdown"}
56-
---
57-
{"jsonrpc":"2.0","method":"exit"}
1+
# RUN: clangd -lit-test < %s | FileCheck %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:///main.cpp","languageId":"cpp","version":1,"text":"void foo(); int main() { foo(); }\n"}}}
5+
---
6+
{"jsonrpc":"2.0","id":1,"method":"textDocument/hover","params":{"textDocument":{"uri":"test:///main.cpp"},"position":{"line":0,"character":27}}}
7+
# CHECK: "id": 1,
8+
# CHECK-NEXT: "jsonrpc": "2.0",
9+
# CHECK-NEXT: "result": {
10+
# CHECK-NEXT: "contents": {
11+
# CHECK-NEXT: "kind": "plaintext",
12+
# CHECK-NEXT: "value": "function foo\n\n→ void\n\nvoid foo()"
13+
# CHECK-NEXT: },
14+
# CHECK-NEXT: "range": {
15+
# CHECK-NEXT: "end": {
16+
# CHECK-NEXT: "character": 28,
17+
# CHECK-NEXT: "line": 0
18+
# CHECK-NEXT: },
19+
# CHECK-NEXT: "start": {
20+
# CHECK-NEXT: "character": 25,
21+
# CHECK-NEXT: "line": 0
22+
# CHECK-NEXT: }
23+
# CHECK-NEXT: }
24+
# CHECK-NEXT: }
25+
# CHECK-NEXT:}
26+
---
27+
{"jsonrpc":"2.0","id":1,"method":"textDocument/hover","params":{"textDocument":{"uri":"test:///main.cpp"},"position":{"line":0,"character":10}}}
28+
# CHECK: "id": 1,
29+
# CHECK-NEXT: "jsonrpc": "2.0",
30+
# CHECK-NEXT: "result": null
31+
---
32+
{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"test:///main2.cpp","languageId":"cpp","version":1,"text":"enum foo{}; int main() { foo f; }\n"}}}
33+
---
34+
{"jsonrpc":"2.0","id":1,"method":"textDocument/hover","params":{"textDocument":{"uri":"test:///main2.cpp"},"position":{"line":0,"character":27}}}
35+
# CHECK: "id": 1,
36+
# CHECK-NEXT: "jsonrpc": "2.0",
37+
# CHECK-NEXT: "result": {
38+
# CHECK-NEXT: "contents": {
39+
# CHECK-NEXT: "kind": "plaintext",
40+
# CHECK-NEXT: "value": "enum foo\n\nenum foo {}"
41+
# CHECK-NEXT: },
42+
# CHECK-NEXT: "range": {
43+
# CHECK-NEXT: "end": {
44+
# CHECK-NEXT: "character": 28,
45+
# CHECK-NEXT: "line": 0
46+
# CHECK-NEXT: },
47+
# CHECK-NEXT: "start": {
48+
# CHECK-NEXT: "character": 25,
49+
# CHECK-NEXT: "line": 0
50+
# CHECK-NEXT: }
51+
# CHECK-NEXT: }
52+
# CHECK-NEXT: }
53+
# CHECK-NEXT:}
54+
---
55+
{"jsonrpc":"2.0","id":3,"method":"shutdown"}
56+
---
57+
{"jsonrpc":"2.0","method":"exit"}
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
# RUN: clangd -input-style=delimited -sync < %s 2>&1 | FileCheck %s
2-
# RUN: clangd -lit-test -sync < %s 2>&1 | FileCheck %s
3-
#
4-
{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{},"trace":"off"}}
5-
6-
---
7-
8-
{"jsonrpc":"2.0","id":3,"method":"shutdown"}
9-
10-
---
11-
12-
{"jsonrpc":"2.0","method":"exit"}
13-
# CHECK-NOT: JSON parse error
1+
# RUN: clangd -input-style=delimited -sync < %s 2>&1 | FileCheck %s
2+
# RUN: clangd -lit-test -sync < %s 2>&1 | FileCheck %s
3+
#
4+
{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{},"trace":"off"}}
5+
6+
---
7+
8+
{"jsonrpc":"2.0","id":3,"method":"shutdown"}
9+
10+
---
11+
12+
{"jsonrpc":"2.0","method":"exit"}
13+
# CHECK-NOT: JSON parse error
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
#ifndef READABILITY_DUPLICATE_INCLUDE_H
2-
#define READABILITY_DUPLICATE_INCLUDE_H
3-
4-
extern int g;
5-
#include "duplicate-include2.h"
6-
extern int h;
7-
#include "duplicate-include2.h"
8-
extern int i;
9-
// CHECK-MESSAGES: :[[@LINE-2]]:1: warning: duplicate include
10-
// CHECK-FIXES: {{^extern int g;$}}
11-
// CHECK-FIXES-NEXT: {{^#include "duplicate-include2.h"$}}
12-
// CHECK-FIXES-NEXT: {{^extern int h;$}}
13-
// CHECK-FIXES-NEXT: {{^extern int i;$}}
14-
15-
#endif
1+
#ifndef READABILITY_DUPLICATE_INCLUDE_H
2+
#define READABILITY_DUPLICATE_INCLUDE_H
3+
4+
extern int g;
5+
#include "duplicate-include2.h"
6+
extern int h;
7+
#include "duplicate-include2.h"
8+
extern int i;
9+
// CHECK-MESSAGES: :[[@LINE-2]]:1: warning: duplicate include
10+
// CHECK-FIXES: {{^extern int g;$}}
11+
// CHECK-FIXES-NEXT: {{^#include "duplicate-include2.h"$}}
12+
// CHECK-FIXES-NEXT: {{^extern int h;$}}
13+
// CHECK-FIXES-NEXT: {{^extern int i;$}}
14+
15+
#endif
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
// This file is intentionally empty.
1+
// This file is intentionally empty.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
// This file is intentionally empty.
1+
// This file is intentionally empty.
Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
// RUN: %check_clang_tidy %s readability-else-after-return %t -- -- -std=c++17
2-
3-
// Constexpr if is an exception to the rule, we cannot remove the else.
4-
void f() {
5-
if (sizeof(int) > 4)
6-
return;
7-
else
8-
return;
9-
// CHECK-MESSAGES: [[@LINE-2]]:3: warning: do not use 'else' after 'return'
10-
11-
if constexpr (sizeof(int) > 4)
12-
return;
13-
else
14-
return;
15-
16-
if constexpr (sizeof(int) > 4)
17-
return;
18-
else if constexpr (sizeof(long) > 4)
19-
return;
20-
else
21-
return;
22-
}
1+
// RUN: %check_clang_tidy %s readability-else-after-return %t -- -- -std=c++17
2+
3+
// Constexpr if is an exception to the rule, we cannot remove the else.
4+
void f() {
5+
if (sizeof(int) > 4)
6+
return;
7+
else
8+
return;
9+
// CHECK-MESSAGES: [[@LINE-2]]:3: warning: do not use 'else' after 'return'
10+
11+
if constexpr (sizeof(int) > 4)
12+
return;
13+
else
14+
return;
15+
16+
if constexpr (sizeof(int) > 4)
17+
return;
18+
else if constexpr (sizeof(long) > 4)
19+
return;
20+
else
21+
return;
22+
}
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
// module.modulemap
2-
3-
module Level1A {
4-
header "Level1A.h"
5-
export *
6-
}
7-
module HasError {
8-
header "HasError.h"
9-
export *
10-
}
1+
// module.modulemap
2+
3+
module Level1A {
4+
header "Level1A.h"
5+
export *
6+
}
7+
module HasError {
8+
header "HasError.h"
9+
export *
10+
}
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
// module.modulemap
2-
3-
module Level1A {
4-
header "Level1A.h"
5-
export *
6-
}
7-
module Missing {
8-
header "Missing.h"
9-
export *
10-
}
1+
// module.modulemap
2+
3+
module Level1A {
4+
header "Level1A.h"
5+
export *
6+
}
7+
module Missing {
8+
header "Missing.h"
9+
export *
10+
}
Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
// module.modulemap
2-
3-
module Level1A {
4-
header "Level1A.h"
5-
export *
6-
}
7-
module Level1B {
8-
header "Level1B.h"
9-
export *
10-
module Level2B {
11-
header "Level2B.h"
12-
export *
13-
}
14-
}
15-
module Level2A {
16-
header "Level2A.h"
17-
export *
18-
}
1+
// module.modulemap
2+
3+
module Level1A {
4+
header "Level1A.h"
5+
export *
6+
}
7+
module Level1B {
8+
header "Level1B.h"
9+
export *
10+
module Level2B {
11+
header "Level2B.h"
12+
export *
13+
}
14+
}
15+
module Level2A {
16+
header "Level2A.h"
17+
export *
18+
}

0 commit comments

Comments
 (0)