summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/abstract.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/abstract.cpp')
-rw-r--r--test/SemaCXX/abstract.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/SemaCXX/abstract.cpp b/test/SemaCXX/abstract.cpp
index b164d9e..e20a890 100644
--- a/test/SemaCXX/abstract.cpp
+++ b/test/SemaCXX/abstract.cpp
@@ -259,3 +259,17 @@ namespace pr9247 {
};
};
}
+
+namespace pr12658 {
+ class C {
+ public:
+ C(int v){}
+ virtual void f() = 0; // expected-note {{unimplemented pure virtual method 'f' in 'C'}}
+ };
+
+ void foo( C& c ) {}
+
+ void bar( void ) {
+ foo(C(99)); // expected-error {{allocating an object of abstract class type 'pr12658::C'}}
+ }
+}
OpenPOWER on IntegriCloud