Flesh out the test cases a little.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111359 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/abstract.cpp b/test/SemaCXX/abstract.cpp
index e448f17..ad079c2 100644
--- a/test/SemaCXX/abstract.cpp
+++ b/test/SemaCXX/abstract.cpp
@@ -205,3 +205,47 @@
     void g(X2 parm11[2]);     // expected-error {{array of abstract class type 'X2<N>'}}
   };
 }
+
+namespace test3 {
+  struct A { // expected-note {{not complete until}}
+    A x; // expected-error {{field has incomplete type}}
+    virtual void abstract() = 0;
+  };
+
+  struct B { // expected-note {{not complete until}}
+    virtual void abstract() = 0;
+    B x; // expected-error {{field has incomplete type}}
+  };
+
+  struct C {
+    static C x; // expected-error {{abstract class}}
+    virtual void abstract() = 0; // expected-note {{pure virtual function}}
+  };
+
+  struct D {
+    virtual void abstract() = 0; // expected-note {{pure virtual function}}
+    static D x; // expected-error {{abstract class}}
+  };
+}
+
+namespace test4 {
+  template <class T> struct A {
+    A x; // expected-error {{abstract class}}
+    virtual void abstract() = 0; // expected-note {{pure virtual function}}
+  };
+
+  template <class T> struct B {
+    virtual void abstract() = 0; // expected-note {{pure virtual function}}
+    B x; // expected-error {{abstract class}}
+  };
+
+  template <class T> struct C {
+    static C x; // expected-error {{abstract class}}
+    virtual void abstract() = 0; // expected-note {{pure virtual function}}
+  };
+
+  template <class T> struct D {
+    virtual void abstract() = 0; // expected-note {{pure virtual function}}
+    static D x; // expected-error {{abstract class}}
+  };
+}