rsmith added a comment.

Please also add some testcases for the corresponding case for a friend function 
template:

  template<typename T> void f();
  template<typename> struct A {
    template<typename T> void f() {}
  };
  template<typename> struct B {
    template<typename T> void f() {}
  };
  A<int> a;
  B<int> b; // ill-formed


================
Comment at: test/SemaCXX/PR25848.cpp:4
@@ +3,3 @@
+struct A;
+typedef int A::* P;
+
----------------
Maybe use `int` instead of a pointer to member type here? May as well keep the 
parts that aren't relevant to the test as simple as possible.

================
Comment at: test/SemaCXX/friend2.cpp:77
@@ +76,3 @@
+// Even if clases are not instantiated and hence friend functions defined in 
them are not
+// available, their declarations must be checked.
+
----------------
"must be" -> "can be" (or maybe "should be")

We're not required to diagnose this; it's a QoI issue.


http://reviews.llvm.org/D16989



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to