Skip to content

Commit f999e10

Browse files
committed
Fix testcase labelling RULE-13-3-3
1 parent f739b65 commit f999e10

File tree

3 files changed

+9
-23
lines changed

3 files changed

+9
-23
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
| functions1.cpp:5:6:5:7 | declaration of f4 | The parameter names of re-declaration of $@ do not use the same names as declaration $@ | functions1.cpp:5:6:5:7 | declaration of f4 | f4 | functions2.cpp:6:6:6:7 | declaration of f4 | f4 |
22
| functions1.cpp:6:6:6:7 | declaration of f5 | The parameter names of re-declaration of $@ do not use the same names as declaration $@ | functions1.cpp:6:6:6:7 | declaration of f5 | f5 | functions2.cpp:7:6:7:7 | declaration of f5 | f5 |
3-
| functions1.cpp:16:6:16:7 | definition of f7 | The parameter names of re-declaration of $@ do not use the same names as declaration $@ | functions1.cpp:16:6:16:7 | definition of f7 | f7 | functions2.cpp:15:13:15:14 | declaration of f7 | f7 |
4-
| functions1.cpp:29:16:29:22 | declaration of methodA | The parameter names of override of $@ do not use the same names as declaration $@ | functions1.cpp:29:16:29:22 | declaration of methodA | methodA | functions1.cpp:34:8:34:14 | declaration of methodA | methodA |
3+
| functions1.cpp:8:6:8:7 | definition of f6 | The parameter names of re-declaration of $@ do not use the same names as declaration $@ | functions1.cpp:8:6:8:7 | definition of f6 | f6 | functions2.cpp:9:13:9:14 | declaration of f6 | f6 |
4+
| functions1.cpp:21:16:21:22 | declaration of methodA | The parameter names of override of $@ do not use the same names as declaration $@ | functions1.cpp:21:16:21:22 | declaration of methodA | methodA | functions1.cpp:26:8:26:14 | declaration of methodA | methodA |
55
| functions2.cpp:6:6:6:7 | declaration of f4 | The parameter names of re-declaration of $@ do not use the same names as declaration $@ | functions2.cpp:6:6:6:7 | declaration of f4 | f4 | functions1.cpp:5:6:5:7 | declaration of f4 | f4 |
66
| functions2.cpp:7:6:7:7 | declaration of f5 | The parameter names of re-declaration of $@ do not use the same names as declaration $@ | functions2.cpp:7:6:7:7 | declaration of f5 | f5 | functions1.cpp:6:6:6:7 | declaration of f5 | f5 |
7-
| functions2.cpp:15:13:15:14 | declaration of f7 | The parameter names of re-declaration of $@ do not use the same names as declaration $@ | functions2.cpp:15:13:15:14 | declaration of f7 | f7 | functions1.cpp:16:6:16:7 | definition of f7 | f7 |
7+
| functions2.cpp:9:13:9:14 | declaration of f6 | The parameter names of re-declaration of $@ do not use the same names as declaration $@ | functions2.cpp:9:13:9:14 | declaration of f6 | f6 | functions1.cpp:8:6:8:7 | definition of f6 | f6 |

cpp/misra/test/rules/RULE-13-3-3/functions1.cpp

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,17 @@ void f3(int a); // COMPLIANT -- diff number but for those that exist, same
55
void f4(int p, int b); // NON_COMPLIANT -- diff name
66
void f5(int b, int a); // NON_COMPLIANT -- swapped names
77

8-
typedef int wi;
9-
typedef int hi;
10-
typedef long a;
11-
12-
a f6(wi w, wi h) { // NON_COMPLIANT
13-
return (a)w * h;
14-
}
15-
16-
void f7(int b, int a) { // NON_COMPLIANT
8+
void f6(int b, int a) { // NON_COMPLIANT
179
return;
1810
}
1911

20-
void f8(int a) { // COMPLIANT
12+
void f7(int a) { // COMPLIANT
2113
return;
2214
}
2315

24-
template <class T> void f9(T t); // COMPLIANT
16+
template <class T> void f8(T t); // COMPLIANT
2517
template <>
26-
void f9<int>(int i); // COMPLIANT - specialization is a diff declaration
18+
void f8<int>(int i); // COMPLIANT - specialization is a diff declaration
2719

2820
class ClassA {
2921
virtual void methodA(int i); // NON_COMPLIANT

cpp/misra/test/rules/RULE-13-3-3/functions2.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@ void f3(int a,
66
void f4(int a, int b); // NON_COMPLIANT -- diff name
77
void f5(int a, int b); // NON_COMPLIANT -- swapped names
88

9-
typedef int wi;
10-
typedef int hi;
11-
typedef long a;
9+
extern void f6(int a, int b); // NON_COMPLIANT
1210

13-
extern a f6(wi w, hi h); // NON_COMPLIANT
14-
15-
extern void f7(int a, int b); // NON_COMPLIANT
16-
17-
extern void f8(int); // COMPLIANT
11+
extern void f7(int); // COMPLIANT

0 commit comments

Comments
 (0)