(self)
| 3105 | self.TestLint("void foo(int param [[maybe_unused]]);", "") |
| 3106 | |
| 3107 | def testLambda(self): |
| 3108 | self.TestLint("auto x = []() {};", "") |
| 3109 | self.TestLint("return []() {};", "") |
| 3110 | self.TestMultiLineLint("auto x = []() {\n};\n", "") |
| 3111 | self.TestLint( |
| 3112 | "int operator[](int x) {};", "You don't need a ; after a } [readability/braces] [4]" |
| 3113 | ) |
| 3114 | |
| 3115 | self.TestMultiLineLint("auto x = [&a,\nb]() {};", "") |
| 3116 | self.TestMultiLineLint("auto x = [&a,\nb]\n() {};", "") |
| 3117 | self.TestMultiLineLint( |
| 3118 | "auto x = [&a,\n" |
| 3119 | " b](\n" |
| 3120 | " int a,\n" |
| 3121 | " int b) {\n" |
| 3122 | " return a +\n" |
| 3123 | " b;\n" |
| 3124 | "};\n", |
| 3125 | "", |
| 3126 | ) |
| 3127 | |
| 3128 | # Avoid false positives with operator[] |
| 3129 | self.TestLint("table_to_children[&*table].push_back(dependent);", "") |
| 3130 | |
| 3131 | def testBraceInitializerList(self): |
| 3132 | self.TestLint("MyStruct p = {1, 2};", "") |
nothing calls this directly
no test coverage detected