diff options
author | Sebastian Redl <sebastian.redl@getdesigned.at> | 2010-09-10 23:27:10 +0000 |
---|---|---|
committer | Sebastian Redl <sebastian.redl@getdesigned.at> | 2010-09-10 23:27:10 +0000 |
commit | 0b34cf7399e61ef33dc5a3af405351822eeb5f3e (patch) | |
tree | 4b76d3d5a7ca28136eda4901c9a27340598a9614 /test/CXX/expr/expr.unary/expr.unary.noexcept/sema.cpp | |
parent | 4e6356426fcfef84e2484820814a8eaaaf547eda (diff) |
Test destructors in delete expressions and of temporaries for throwing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113664 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CXX/expr/expr.unary/expr.unary.noexcept/sema.cpp')
-rw-r--r-- | test/CXX/expr/expr.unary/expr.unary.noexcept/sema.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/test/CXX/expr/expr.unary/expr.unary.noexcept/sema.cpp b/test/CXX/expr/expr.unary/expr.unary.noexcept/sema.cpp index 5182709c89..0605746a58 100644 --- a/test/CXX/expr/expr.unary/expr.unary.noexcept/sema.cpp +++ b/test/CXX/expr/expr.unary/expr.unary.noexcept/sema.cpp @@ -86,9 +86,19 @@ struct S2 { void *operator new(__typeof__(sizeof(int)) sz, int) throw(); +struct Bad1 { + ~Bad1() throw(int); +}; +struct Bad2 { + void operator delete(void*) throw(int); +}; + void implicits() { N(new int); P(new (0) int); + P(delete (int*)0); + N(delete (Bad1*)0); + N(delete (Bad2*)0); N(S2()); P(S2(0, 0)); S2 s; @@ -98,7 +108,7 @@ void implicits() { P(s - 0); N(static_cast<int>(s)); P(static_cast<float>(s)); - // FIXME: test destructors of temporaries + N(Bad1()); } struct V { |