================
Comment at: test/clang-tidy/google-readability-function.cpp:69
@@ +68,3 @@
+struct Derived : public Base {
+  void foo(int);
+// CHECK-MESSAGES: :[[@LINE-1]]:15: warning: all parameters should be named in 
a function
----------------
Alexander Kornienko wrote:
> What does the check do in this case? 
> 
>   struct Base1 { virtual void f(int i) {} };
>   struct Base2 { virtual void f(bool b) {} };
>   template <typename T, typename Y>
>   struct Derived : public T {
>     void f(Y) {}
>   };
>   int main() {
>     Derived<Base1, int>();
>     Derived<Base2, bool>();
>   }
> 
I think it works because we see the template definition first. But I'll add the 
bulky template instance matcher, safe is better.

```
5:13: warning: all parameters should be named in a function 
[google-readability-function]
    void f(Y) {}
            ^
             /*unused*/
```

http://reviews.llvm.org/D4518



_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to