| 957 | self.TestLint("auto x = implicit_cast<string &(*)(int)>(&foo);", "") |
| 958 | |
| 959 | def testRuntimeSelfinit(self): |
| 960 | self.TestLint( |
| 961 | "Foo::Foo(Bar r, Bel l) : r_(r_), l_(l_) { }", |
| 962 | "You seem to be initializing a member variable with itself. [runtime/init] [4]", |
| 963 | ) |
| 964 | self.TestLint( |
| 965 | "Foo::Foo(Bar r, Bel l) : r_(CHECK_NOTNULL(r_)) { }", |
| 966 | "You seem to be initializing a member variable with itself. [runtime/init] [4]", |
| 967 | ) |
| 968 | self.TestLint("Foo::Foo(Bar r, Bel l) : r_(r), l_(l) { }", "") |
| 969 | self.TestLint("Foo::Foo(Bar r) : r_(r), l_(r_), ll_(l_) { }", "") |
| 970 | |
| 971 | # Test for unnamed arguments in a method. |
| 972 | def testCheckForUnnamedParams(self): |