Skip to content

Commit 8c69ca3

Browse files
committed
Indentation and some missing braces
1 parent 05ab6b7 commit 8c69ca3

File tree

5 files changed

+30
-30
lines changed

5 files changed

+30
-30
lines changed

clang-tools-extra/test/clang-tidy/checkers/modernize/replace-disallow-copy-and-assign-macro.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class TestClass1 {
3333
DISALLOW_COPY_AND_ASSIGN(TestClass1);
3434
};
3535
// CHECK-MESSAGES-DEFAULT: :[[@LINE-2]]:3: warning: prefer deleting copy constructor and assignment operator over using macro 'DISALLOW_COPY_AND_ASSIGN' [modernize-replace-disallow-copy-and-assign-macro]
36-
// CHECK-FIXES-DEFAULT: TestClass1(const TestClass1 &) = delete;
36+
// CHECK-FIXES-DEFAULT: TestClass1(const TestClass1 &) = delete;
3737
// CHECK-FIXES-DEFAULT-NEXT: const TestClass1 &operator=(const TestClass1 &) = delete;
3838

3939
#define MY_MACRO_NAME(TypeName)
@@ -43,7 +43,7 @@ class TestClass2 {
4343
MY_MACRO_NAME(TestClass2);
4444
};
4545
// CHECK-MESSAGES-DIFFERENT-NAME: :[[@LINE-2]]:3: warning: prefer deleting copy constructor and assignment operator over using macro 'MY_MACRO_NAME' [modernize-replace-disallow-copy-and-assign-macro]
46-
// CHECK-FIXES-DIFFERENT-NAME: TestClass2(const TestClass2 &) = delete;
46+
// CHECK-FIXES-DIFFERENT-NAME: TestClass2(const TestClass2 &) = delete;
4747
// CHECK-FIXES-DIFFERENT-NAME-NEXT: const TestClass2 &operator=(const TestClass2 &) = delete;
4848

4949
#define DISALLOW_COPY_AND_ASSIGN_FINALIZE(TypeName) \
@@ -58,7 +58,7 @@ class TestClass3 {
5858
DISALLOW_COPY_AND_ASSIGN_FINALIZE(TestClass3)
5959
};
6060
// CHECK-MESSAGES-FINALIZE: :[[@LINE-2]]:3: warning: prefer deleting copy constructor and assignment operator over using macro 'DISALLOW_COPY_AND_ASSIGN_FINALIZE' [modernize-replace-disallow-copy-and-assign-macro]
61-
// CHECK-FIXES-FINALIZE: TestClass3(const TestClass3 &) = delete;
61+
// CHECK-FIXES-FINALIZE: TestClass3(const TestClass3 &) = delete;
6262
// CHECK-FIXES-FINALIZE-NEXT: const TestClass3 &operator=(const TestClass3 &) = delete;
6363

6464
#define DISALLOW_COPY_AND_ASSIGN_MORE_AGUMENTS(A, B)

clang-tools-extra/test/clang-tidy/checkers/readability/identifier-naming-member-decl-usage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ template <typename T>
203203
struct DependentBase {
204204
int depValue;
205205
// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for member 'depValue'
206-
// CHECK-FIXES: int DepValue;
206+
// CHECK-FIXES: int DepValue;
207207
};
208208

209209
template <typename T>

clang-tools-extra/test/clang-tidy/checkers/readability/isolate-declaration.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ void f2() {
2424
// CHECK-MESSAGES: [[@LINE-4]]:3: warning: multiple declarations in a single statement reduces readability
2525
// CHECK-FIXES: int /* here is a comment */ v1;
2626
// CHECK-FIXES: int /* here is a comment */ // another comment
27-
// CHECK-FIXES: v2 = 42 // Ok, more comments
28-
// CHECK-FIXES: ;
27+
// CHECK-FIXES: v2 = 42 // Ok, more comments
28+
// CHECK-FIXES: ;
2929

3030
auto int1 = 42, int2 = 0, int3 = 43;
3131
// CHECK-MESSAGES: [[@LINE-1]]:3: warning: multiple declarations in a single statement reduces readability
@@ -334,12 +334,12 @@ void complex_typedefs() {
334334
// CHECK-MESSAGES: [[@LINE-7]]:3: warning: multiple declarations in a single statement reduces readability
335335
// CHECK-FIXES: int intfunction = returner();
336336
// CHECK-FIXES: int intarray[] =
337-
// CHECK-FIXES: {
338-
// CHECK-FIXES: 1,
339-
// CHECK-FIXES: 2,
340-
// CHECK-FIXES: 3,
341-
// CHECK-FIXES: 4
342-
// CHECK-FIXES: };
337+
// CHECK-FIXES: {
338+
// CHECK-FIXES: 1,
339+
// CHECK-FIXES: 2,
340+
// CHECK-FIXES: 3,
341+
// CHECK-FIXES: 4
342+
// CHECK-FIXES: };
343343
// CHECK-FIXES: int bb = 4;
344344
// clang-format on
345345

@@ -368,7 +368,7 @@ void complex_typedefs() {
368368
*literal2 = "empty", literal3[] = "three";
369369
// CHECK-MESSAGES: [[@LINE-3]]:3: warning: multiple declarations in a single statement reduces readability
370370
// CHECK-FIXES: const char *literal1 = "clang" "test"\
371-
// CHECK-FIXES: "one";
371+
// CHECK-FIXES: "one";
372372
// CHECK-FIXES: const char *literal2 = "empty";
373373
// CHECK-FIXES: const char literal3[] = "three";
374374
// clang-format on

clang-tools-extra/test/clang-tidy/checkers/readability/simplify-boolean-expr-chained-conditional-assignment.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ void chained_conditional_assignment(int i) {
2929
b = false;
3030
// CHECK-MESSAGES: :[[@LINE-3]]:9: warning: {{.*}} in conditional assignment
3131
// CHECK-FIXES: else if (i < 10)
32-
// CHECK-FIXES-NEXT: b = false;
32+
// CHECK-FIXES-NEXT: b = false;
3333
// CHECK-FIXES-NEXT: else b = i > 20;
3434
}

clang-tools-extra/test/clang-tidy/checkers/readability/simplify-boolean-expr-members.cpp

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -42,31 +42,31 @@ void S::operator_equals() {
4242
m_b1 = (i > 2);
4343
if (m_b1 == true) {
4444
// CHECK-MESSAGES: :[[@LINE-1]]:15: warning: {{.*}} to boolean operator
45-
// CHECK-FIXES: if (m_b1)
45+
// CHECK-FIXES: if (m_b1) {
4646
i = 5;
4747
} else {
4848
i = 6;
4949
}
5050
m_b2 = (i > 4);
5151
if (m_b2 == false) {
5252
// CHECK-MESSAGES: :[[@LINE-1]]:15: warning: {{.*}} to boolean operator
53-
// CHECK-FIXES: if (!m_b2)
53+
// CHECK-FIXES: if (!m_b2) {
5454
i = 7;
5555
} else {
5656
i = 9;
5757
}
5858
m_b3 = (i > 6);
5959
if (true == m_b3) {
6060
// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: {{.*}} to boolean operator
61-
// CHECK-FIXES: if (m_b3)
61+
// CHECK-FIXES: if (m_b3) {
6262
i = 10;
6363
} else {
6464
i = 11;
6565
}
6666
m_b4 = (i > 8);
6767
if (false == m_b4) {
6868
// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: {{.*}} to boolean operator
69-
// CHECK-FIXES: if (!m_b4)
69+
// CHECK-FIXES: if (!m_b4) {
7070
i = 12;
7171
} else {
7272
i = 13;
@@ -78,31 +78,31 @@ void S::operator_or() {
7878
m_b1 = (i > 10);
7979
if (m_b1 || false) {
8080
// CHECK-MESSAGES: :[[@LINE-1]]:15: warning: {{.*}} to boolean operator
81-
// CHECK-FIXES: if (m_b1)
81+
// CHECK-FIXES: if (m_b1) {
8282
i = 14;
8383
} else {
8484
i = 15;
8585
}
8686
m_b2 = (i > 10);
8787
if (m_b2 || true) {
8888
// CHECK-MESSAGES: :[[@LINE-1]]:15: warning: {{.*}} to boolean operator
89-
// CHECK-FIXES: if (true)
89+
// CHECK-FIXES: if (true) {
9090
i = 16;
9191
} else {
9292
i = 17;
9393
}
9494
m_b3 = (i > 10);
9595
if (false || m_b3) {
9696
// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: {{.*}} to boolean operator
97-
// CHECK-FIXES: if (m_b3)
97+
// CHECK-FIXES: if (m_b3) {
9898
i = 18;
9999
} else {
100100
i = 19;
101101
}
102102
m_b4 = (i > 10);
103103
if (true || m_b4) {
104104
// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: {{.*}} to boolean operator
105-
// CHECK-FIXES: if (true)
105+
// CHECK-FIXES: if (true) {
106106
i = 20;
107107
} else {
108108
i = 21;
@@ -114,31 +114,31 @@ void S::operator_and() {
114114
m_b1 = (i > 20);
115115
if (m_b1 && false) {
116116
// CHECK-MESSAGES: :[[@LINE-1]]:15: warning: {{.*}} to boolean operator
117-
// CHECK-FIXES: if (false)
117+
// CHECK-FIXES: if (false) {
118118
i = 22;
119119
} else {
120120
i = 23;
121121
}
122122
m_b2 = (i > 20);
123123
if (m_b2 && true) {
124124
// CHECK-MESSAGES: :[[@LINE-1]]:15: warning: {{.*}} to boolean operator
125-
// CHECK-FIXES: if (m_b2)
125+
// CHECK-FIXES: if (m_b2) {
126126
i = 24;
127127
} else {
128128
i = 25;
129129
}
130130
m_b3 = (i > 20);
131131
if (false && m_b3) {
132132
// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: {{.*}} to boolean operator
133-
// CHECK-FIXES: if (false)
133+
// CHECK-FIXES: if (false) {
134134
i = 26;
135135
} else {
136136
i = 27;
137137
}
138138
m_b4 = (i > 20);
139139
if (true && m_b4) {
140140
// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: {{.*}} to boolean operator
141-
// CHECK-FIXES: if (m_b4)
141+
// CHECK-FIXES: if (m_b4) {
142142
i = 28;
143143
} else {
144144
i = 29;
@@ -165,31 +165,31 @@ void S::operator_not_equal() {
165165
m_b1 = (i > 20);
166166
if (false != m_b1) {
167167
// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: {{.*}} to boolean operator
168-
// CHECK-FIXES: if (m_b1)
168+
// CHECK-FIXES: if (m_b1) {
169169
i = 30;
170170
} else {
171171
i = 31;
172172
}
173173
m_b2 = (i > 20);
174174
if (true != m_b2) {
175175
// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: {{.*}} to boolean operator
176-
// CHECK-FIXES: if (!m_b2)
176+
// CHECK-FIXES: if (!m_b2) {
177177
i = 32;
178178
} else {
179179
i = 33;
180180
}
181181
m_b3 = (i > 20);
182182
if (m_b3 != false) {
183183
// CHECK-MESSAGES: :[[@LINE-1]]:15: warning: {{.*}} to boolean operator
184-
// CHECK-FIXES: if (m_b3)
184+
// CHECK-FIXES: if (m_b3) {
185185
i = 34;
186186
} else {
187187
i = 35;
188188
}
189189
m_b4 = (i > 20);
190190
if (m_b4 != true) {
191191
// CHECK-MESSAGES: :[[@LINE-1]]:15: warning: {{.*}} to boolean operator
192-
// CHECK-FIXES: if (!m_b4)
192+
// CHECK-FIXES: if (!m_b4) {
193193
i = 36;
194194
} else {
195195
i = 37;

0 commit comments

Comments
 (0)