summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/abstract.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaCXX/abstract.cpp')
-rw-r--r--clang/test/SemaCXX/abstract.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/abstract.cpp b/clang/test/SemaCXX/abstract.cpp
index 02305881394..20b35da83db 100644
--- a/clang/test/SemaCXX/abstract.cpp
+++ b/clang/test/SemaCXX/abstract.cpp
@@ -66,3 +66,19 @@ class F {
virtual void f() = 0; // expected-note {{pure virtual function 'f'}}
};
+
+class Abstract;
+
+void t7(Abstract a); // expected-error {{parameter type 'Abstract' is an abstract class}}
+
+void t8() {
+ void h(Abstract a); // expected-error {{parameter type 'Abstract' is an abstract class}}
+}
+
+namespace N {
+ void h(Abstract a); // expected-error {{parameter type 'Abstract' is an abstract class}}
+}
+
+class Abstract {
+ virtual void f() = 0; // expected-note {{pure virtual function 'f'}}
+};
OpenPOWER on IntegriCloud