summaryrefslogtreecommitdiffstats
path: root/clang/test/CXX/expr/expr.unary/expr.unary.noexcept/sema.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CXX/expr/expr.unary/expr.unary.noexcept/sema.cpp')
-rw-r--r--clang/test/CXX/expr/expr.unary/expr.unary.noexcept/sema.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/clang/test/CXX/expr/expr.unary/expr.unary.noexcept/sema.cpp b/clang/test/CXX/expr/expr.unary/expr.unary.noexcept/sema.cpp
index 5182709c89d..0605746a585 100644
--- a/clang/test/CXX/expr/expr.unary/expr.unary.noexcept/sema.cpp
+++ b/clang/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 {
OpenPOWER on IntegriCloud