File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 15
15
16
16
import cpp
17
17
import codingstandards.cpp.autosar
18
+ import codingstandards.cpp.Class
18
19
19
20
/**
20
21
* Holds if the class has a non-virtual member function with the given name.
48
49
) and
49
50
// Exclude compiler generated member functions which include things like copy constructor that hide base class
50
51
// copy constructors.
51
- not overridingDecl .isCompilerGenerated ( )
52
+ not overridingDecl .isCompilerGenerated ( ) and
53
+ // Exclude special member functions, which cannot be inherited.
54
+ not overridingDecl instanceof SpecialMemberFunction
52
55
select overridingDecl ,
53
56
"Declaration for member '" + name + "' hides non-overridable inherited member function $@" ,
54
57
hiddenDecl , hiddenDecl .getName ( )
Original file line number Diff line number Diff line change @@ -76,4 +76,9 @@ void f2() {
76
76
c5.f1 (0.0 ); // calls C5::f1(double)
77
77
c5.f2 (0 ); // calls C1::f2(int)
78
78
c5.f2 (0.0 ); // calls C5::f2(double)
79
- }
79
+ }
80
+
81
+ class C6 : public C1 {
82
+ public:
83
+ C6 &operator =(const C6 &); // COMPLIANT
84
+ };
You can’t perform that action at this time.
0 commit comments