2 // { dg-options "-Weffc++" }
3 // Contributed by Benjamin Kosnik <bkoz at redhat dot com>
4 // PR c++/16165 and PR c++/8211: Improve item 11 of -Weffc++
7 // We should not warn for this class since this kind of pointers can
8 // never hold dynamic memory.
11 void (A::*func2)(void);
21 // We do not warn for this class because there is no destructor, so we
22 // assume there is no dynamic memory allocated (it could point to a
30 // We should emit a warning for these
31 struct C1 { // { dg-warning "" }
37 struct C2 { // { dg-warning "" }
44 struct C3 { // { dg-warning "" }
48 C3& operator=(const C3&);
57 C4& operator=(const C4&);