aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/try-catch.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/try-catch.cpp')
-rw-r--r--test/SemaCXX/try-catch.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/SemaCXX/try-catch.cpp b/test/SemaCXX/try-catch.cpp
index 920a1d59c7..97dbaee10d 100644
--- a/test/SemaCXX/try-catch.cpp
+++ b/test/SemaCXX/try-catch.cpp
@@ -16,4 +16,9 @@ void f()
} catch(...) {
int j = i; // expected-error {{use of undeclared identifier 'i'}}
}
+
+ try {
+ } catch(...) { // expected-error {{catch-all handler must come last}}
+ } catch(int) {
+ }
}