From 29cafa66ad3878dbb9f82615f19fa0bded2e443c Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 12 Jun 2011 15:46:16 +0000 Subject: Vendor import of clang trunk r132879: http://llvm.org/svn/llvm-project/cfe/trunk@132879 --- test/CXX/expr/expr.unary/expr.unary.noexcept/sema.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test/CXX/expr/expr.unary/expr.unary.noexcept') 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 28ed62c71ec09..6d1e523b51bf5 100644 --- a/test/CXX/expr/expr.unary/expr.unary.noexcept/sema.cpp +++ b/test/CXX/expr/expr.unary/expr.unary.noexcept/sema.cpp @@ -97,6 +97,8 @@ struct Bad2 { void operator delete(void*) throw(int); }; +typedef int X; + void implicits() { N(new int); P(new (0) int); @@ -113,6 +115,7 @@ void implicits() { N(static_cast(s)); P(static_cast(s)); N(Bad1()); + P(X().~X()); } struct V { @@ -155,12 +158,16 @@ void gencon() { N(G3()); } +template void f(T&&) noexcept; template void late() { B(b, typeid(*(T*)0)); B(b, T(1)); B(b, static_cast(S2(0, 0))); B(b, S1() + T()); + P(f(T())); + P(new (0) T); + P(delete (T*)0); } struct S3 { virtual ~S3() throw(); @@ -168,9 +175,15 @@ struct S3 { explicit S3(int); S3(const S2&); }; +template T&& f2() noexcept; +template +void late2() { + P(dynamic_cast(f2())); +} void operator +(const S1&, float) throw(); void operator +(const S1&, const S3&); void tlate() { late(); late(); + late2(); } -- cgit v1.2.3