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