LGTM

  I guess it would be hard to avoid diagnosing this code if we did the check in 
Sema:
    struct __virtual_inheritance A;
    int foo(A *a, int A::*mp) {
        return a->*mp;
    }
    struct B {};
    struct A : virtual B {
      int a;
    };

  And it's a super special case since you have to use __virtual_inheritance, 
not __multiple_inheritance or some other.


================
Comment at: test/CodeGenCXX/microsoft-abi-member-pointers.cpp:565
@@ +564,3 @@
+int foo(A *a, int A::*mp) {
+    return a->*mp; // expected-error{{requires a complete class type}}
+}
----------------
I'd test member function pointers too, just for completeness.


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

Reply via email to