summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/try-catch.cpp
diff options
context:
space:
mode:
authorSebastian Redl <sebastian.redl@getdesigned.at>2009-04-27 20:27:31 +0000
committerSebastian Redl <sebastian.redl@getdesigned.at>2009-04-27 20:27:31 +0000
commit4de47b445b9643563f24729cfcd6124614a05392 (patch)
tree8fe82e2062ea7907fad02f412b7cd494fed7fb52 /clang/test/SemaCXX/try-catch.cpp
parent76466373794f34303146931969c1f1905ad526fe (diff)
downloadbcm5719-llvm-4de47b445b9643563f24729cfcd6124614a05392.tar.gz
bcm5719-llvm-4de47b445b9643563f24729cfcd6124614a05392.zip
Improve validation of C++ exception handling: diagnose throwing incomplete types and jumps into protected try-catch scopes.
llvm-svn: 70242
Diffstat (limited to 'clang/test/SemaCXX/try-catch.cpp')
-rw-r--r--clang/test/SemaCXX/try-catch.cpp24
1 files changed, 0 insertions, 24 deletions
diff --git a/clang/test/SemaCXX/try-catch.cpp b/clang/test/SemaCXX/try-catch.cpp
deleted file mode 100644
index 653deaa5fbc..00000000000
--- a/clang/test/SemaCXX/try-catch.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-// RUN: clang-cc -fsyntax-only -verify %s
-
-struct A; // expected-note 3 {{forward declaration of 'struct A'}}
-
-void f()
-{
- try {
- } catch(int i) { // expected-note {{previous definition}}
- int j = i;
- int i; // expected-error {{redefinition of 'i'}}
- } catch(float i) {
- } catch(void v) { // expected-error {{cannot catch incomplete type 'void'}}
- } catch(A a) { // expected-error {{cannot catch incomplete type 'struct A'}}
- } catch(A *a) { // expected-error {{cannot catch pointer to incomplete type 'struct A'}}
- } catch(A &a) { // expected-error {{cannot catch reference to incomplete type 'struct A'}}
- } catch(...) {
- int j = i; // expected-error {{use of undeclared identifier 'i'}}
- }
-
- try {
- } catch(...) { // expected-error {{catch-all handler must come last}}
- } catch(int) {
- }
-}
OpenPOWER on IntegriCloud