Skip to content

Commit 6c5827c

Browse files
committed
M14-6-1: Address test irregularities
* Formatting * Address compiler testing issues - Accidental name conflicts - Type of member function parameter
1 parent 5beb129 commit 6c5827c

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

cpp/autosar/test/rules/M14-6-1/test.cpp

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ template <typename T> class A : B<T> {
3030
g1(); // COMPLIANT, identifier not found in B
3131
}
3232
void m3(int m) {
33-
m = 0; // COMPLIANT, hides member
33+
m = 0; // COMPLIANT, hides member
3434
}
3535
void m4() {
3636
int m = 0;
37-
m = 0; // COMPLIANT, hides member
37+
m = 0; // COMPLIANT, hides member
3838
}
3939
};
4040

@@ -59,20 +59,21 @@ class D {
5959
class C : D {
6060
public:
6161
void m1() {
62-
m = 0; // COMPLIANT - does not apply to non-class templates
63-
g(); // COMPLIANT - does not apply to non-class templates
62+
m = 0; // COMPLIANT - does not apply to non-class templates
63+
g(); // COMPLIANT - does not apply to non-class templates
6464
sg(); // COMPLIANT - does not apply to non-class templates
65-
TYPE t = 0; // COMPLIANT - does not apply to non-class templates
65+
TYPE t1 = 0; // COMPLIANT - does not apply to non-class templates
6666
// void (*p)() = &g; // NON_COMPILABLE
6767
}
6868
};
6969

70-
template <typename t> class E : D {
70+
template <typename T> class E : D {
7171
public:
7272
void m1() {
73-
m = 0; // COMPLIANT - does not apply to non dependent base types
74-
g(); // COMPLIANT - does not apply to non dependent base types
75-
TYPE t = 0; // COMPLIANT - does not apply to non dependent base types
76-
void (*p)() = &g; // COMPLIANT - does not apply to non dependent base types
73+
m = 0; // COMPLIANT - does not apply to non dependent base types
74+
g(); // COMPLIANT - does not apply to non dependent base types
75+
TYPE t1 = 0; // COMPLIANT - does not apply to non dependent base types
76+
void (D::*p)() =
77+
&g; // COMPLIANT - does not apply to non dependent base types
7778
}
7879
};

0 commit comments

Comments
 (0)