diff options
Diffstat (limited to 'test/SemaCXX/constructor-recovery.cpp')
-rw-r--r-- | test/SemaCXX/constructor-recovery.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/SemaCXX/constructor-recovery.cpp b/test/SemaCXX/constructor-recovery.cpp new file mode 100644 index 0000000..50fdc96 --- /dev/null +++ b/test/SemaCXX/constructor-recovery.cpp @@ -0,0 +1,10 @@ +// RUN: clang-cc -fsyntax-only -verify %s + +struct C { // expected-note {{candidate function}} + virtual C() = 0; // expected-error{{constructor cannot be declared 'virtual'}} \ + expected-note {{candidate function}} +}; + +void f() { + C c; // expected-error {{call to constructor of 'c' is ambiguous}} +} |