diff options
| author | Eli Friedman <eli.friedman@gmail.com> | 2010-06-03 20:39:03 +0000 |
|---|---|---|
| committer | Eli Friedman <eli.friedman@gmail.com> | 2010-06-03 20:39:03 +0000 |
| commit | 91a3d27ec0a586e5068df28b026d7e6cba626488 (patch) | |
| tree | 58016680ebcc82440c269bf7a71f06f82b7a2419 /clang/test/CodeGenCXX/throw-expression-dtor.cpp | |
| parent | d83e3e7750f29c1e2dde2d1e48c2d74861cd3cd6 (diff) | |
| download | bcm5719-llvm-91a3d27ec0a586e5068df28b026d7e6cba626488.tar.gz bcm5719-llvm-91a3d27ec0a586e5068df28b026d7e6cba626488.zip | |
Make sure to check the accessibility of and mark the destructor for the
operand of a throw expression. Fixes PR7281.
llvm-svn: 105408
Diffstat (limited to 'clang/test/CodeGenCXX/throw-expression-dtor.cpp')
| -rw-r--r-- | clang/test/CodeGenCXX/throw-expression-dtor.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/throw-expression-dtor.cpp b/clang/test/CodeGenCXX/throw-expression-dtor.cpp new file mode 100644 index 00000000000..5cda625bbf9 --- /dev/null +++ b/clang/test/CodeGenCXX/throw-expression-dtor.cpp @@ -0,0 +1,14 @@ +// RUN: %clang_cc1 %s -emit-llvm-only -verify +// PR7281 + +class A { +public: + ~A(); +}; +class B : public A { + void ice_throw(); +}; +void B::ice_throw() { + throw *this; +} + |

