aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/__try.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/__try.cpp')
-rw-r--r--test/SemaCXX/__try.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/test/SemaCXX/__try.cpp b/test/SemaCXX/__try.cpp
index 1c45581b32f9..28a370148878 100644
--- a/test/SemaCXX/__try.cpp
+++ b/test/SemaCXX/__try.cpp
@@ -1,5 +1,4 @@
// RUN: %clang_cc1 -fsyntax-only -verify -fborland-extensions -fcxx-exceptions %s
-// expected-no-diagnostics
// This test is from http://docwiki.embarcadero.com/RADStudio/en/Try
@@ -77,3 +76,14 @@ template void Except<void>();
template void Finally<void>();
}
+
+void test___leave() {
+ // Most tests are in __try.c.
+
+ // Clang accepts try with __finally. MSVC doesn't. (Maybe a Borland thing?)
+ // __leave in mixed blocks isn't supported.
+ try {
+ __leave; // expected-error{{'__leave' statement not in __try block}}
+ } __finally {
+ }
+}