Skip to content

Commit 421ee96

Browse files
format test.cpp
1 parent 8f850c3 commit 421ee96

File tree

4 files changed

+31
-20
lines changed

4 files changed

+31
-20
lines changed
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
| test.cpp:167:7:167:8 | C1 | Class 'C1' has a deprecated implicit copy assignment operator. |
22
| test.cpp:167:7:167:8 | C1 | Class 'C1' has a deprecated implicit copy constructor. |
3-
| test.cpp:174:7:174:8 | C2 | Class 'C2' has a deprecated implicit copy assignment operator. |
4-
| test.cpp:181:7:181:8 | C3 | Class 'C3' has a deprecated implicit copy constructor. |
5-
| test.cpp:188:7:188:8 | C4 | Class 'C4' has a deprecated implicit copy assignment operator. |
6-
| test.cpp:188:7:188:8 | C4 | Class 'C4' has a deprecated implicit copy constructor. |
7-
| test.cpp:196:7:196:8 | C5 | Class 'C5' has a deprecated implicit copy assignment operator. |
8-
| test.cpp:196:7:196:8 | C5 | Class 'C5' has a deprecated implicit copy constructor. |
9-
| test.cpp:214:7:214:8 | C7 | Class 'C7' has a deprecated implicit copy assignment operator. |
10-
| test.cpp:214:7:214:8 | C7 | Class 'C7' has a deprecated implicit copy constructor. |
11-
| test.cpp:223:7:223:8 | C8 | Class 'C8' has a deprecated implicit copy assignment operator. |
12-
| test.cpp:223:7:223:8 | C8 | Class 'C8' has a deprecated implicit copy constructor. |
13-
| test.cpp:231:7:231:8 | C9 | Class 'C9' has a deprecated implicit copy assignment operator. |
3+
| test.cpp:175:7:175:8 | C2 | Class 'C2' has a deprecated implicit copy assignment operator. |
4+
| test.cpp:183:7:183:8 | C3 | Class 'C3' has a deprecated implicit copy constructor. |
5+
| test.cpp:191:7:191:8 | C4 | Class 'C4' has a deprecated implicit copy assignment operator. |
6+
| test.cpp:191:7:191:8 | C4 | Class 'C4' has a deprecated implicit copy constructor. |
7+
| test.cpp:200:7:200:8 | C5 | Class 'C5' has a deprecated implicit copy assignment operator. |
8+
| test.cpp:200:7:200:8 | C5 | Class 'C5' has a deprecated implicit copy constructor. |
9+
| test.cpp:220:7:220:8 | C7 | Class 'C7' has a deprecated implicit copy assignment operator. |
10+
| test.cpp:220:7:220:8 | C7 | Class 'C7' has a deprecated implicit copy constructor. |
11+
| test.cpp:230:7:230:8 | C8 | Class 'C8' has a deprecated implicit copy assignment operator. |
12+
| test.cpp:230:7:230:8 | C8 | Class 'C8' has a deprecated implicit copy constructor. |
13+
| test.cpp:239:7:239:8 | C9 | Class 'C9' has a deprecated implicit copy assignment operator. |
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
| test.cpp:231:7:231:8 | C9 | Class 'C9' may have a deprecated implicit copy constructor. |
1+
| test.cpp:239:7:239:8 | C9 | Class 'C9' may have a deprecated implicit copy constructor. |
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
| test.cpp:255:15:255:21 | m2 | Static constexpr data member 'm2' is redeclared, which is a deprecated language feature. |
1+
| test.cpp:266:5:266:11 | m2 | Static constexpr data member 'm2' is redeclared, which is a deprecated language feature. |

cpp/misra/test/rules/RULE-4-1-2/test.cpp

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -166,27 +166,31 @@ class NonTrivial {
166166
// User declared destructor, deprecated CC and assignment.
167167
class C1 { // NON_COMPLIANT
168168
NonTrivial m1;
169+
169170
public:
170-
~C1()=default;
171+
~C1() = default;
171172
};
172173

173-
// User declared CC results in deprecated
174+
// User declared CC results in deprecated
174175
class C2 { // NON_COMPLIANT
175176
NonTrivial m1;
177+
176178
public:
177-
C2(const C2 &)=default;
179+
C2(const C2 &) = default;
178180
};
179181

180182
// User declared assignment results in deprecated
181183
class C3 { // NON_COMPLIANT
182184
NonTrivial m1;
185+
183186
public:
184-
C3 &operator=(const C3 &)=default;
187+
C3 &operator=(const C3 &) = default;
185188
};
186189

187190
// Explicitly defaulted CC and assignment
188191
class C4 { // NON_COMPLIANT
189192
NonTrivial m1;
193+
190194
public:
191195
C4(const C4 &) = default;
192196
C4 &operator=(const C4 &) = default;
@@ -195,6 +199,7 @@ class C4 { // NON_COMPLIANT
195199
// Explicitly defaulted CC and assignment, user declared dtor
196200
class C5 { // NON_COMPLIANT
197201
NonTrivial m1;
202+
198203
public:
199204
C5(const C5 &) = default;
200205
C5 &operator=(const C5 &) = default;
@@ -204,6 +209,7 @@ class C5 { // NON_COMPLIANT
204209
// User defined CC and assignment, user declared dtor
205210
class C6 { // COMPLIANT
206211
NonTrivial m1;
212+
207213
public:
208214
C6(const C6 &) {}
209215
C6 &operator=(const C6 &) { return *this; }
@@ -213,6 +219,7 @@ class C6 { // COMPLIANT
213219
// Trivial with explicitly defaulted CC and assignment, user declared dtor
214220
class C7 { // NON_COMPLIANT
215221
int m1;
222+
216223
public:
217224
C7(const C7 &) = default;
218225
C7 &operator=(const C7 &) = default;
@@ -222,6 +229,7 @@ class C7 { // NON_COMPLIANT
222229
// Trivial with explicitly defaulted CC and assignment, implicit ctor
223230
class C8 { // NON_COMPLIANT
224231
int m1;
232+
225233
public:
226234
C8(const C8 &) = default;
227235
C8 &operator=(const C8 &) = default;
@@ -230,6 +238,7 @@ class C8 { // NON_COMPLIANT
230238
// Trivial with user declared dtor
231239
class C9 { // NON_COMPLIANT
232240
int m1;
241+
233242
public:
234243
~C9() = default;
235244
};
@@ -246,11 +255,13 @@ class C11 { // COMPLIANT
246255

247256
class C12 {
248257
static constexpr int m1 = 42; // COMPLIANT - static constexpr data member
249-
static constexpr int m2 = 42; // NON_COMPLIANT - redeclaration of static constexpr data member
258+
static constexpr int m2 =
259+
42; // NON_COMPLIANT - redeclaration of static constexpr data member
250260
static const int m3 = 42; // COMPLIANT - static const data member
251261
static const int m4 = 42; // COMPLIANT - static const data member
252-
static const int m5; // COMPLIANT - static const data member
262+
static const int m5; // COMPLIANT - static const data member
253263
};
254264

255-
constexpr int C12::m2; // NON_COMPLIANT - definition of static constexpr data member
265+
constexpr int
266+
C12::m2; // NON_COMPLIANT - definition of static constexpr data member
256267
const int C12::m4; // COMPLIANT - definition of static const data member

0 commit comments

Comments
 (0)