diff options
author | dim <dim@FreeBSD.org> | 2013-12-22 00:07:40 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2013-12-22 00:07:40 +0000 |
commit | 952eddef9aff85b1e92626e89baaf7a360e2ac85 (patch) | |
tree | df8df0b0067b381eab470a3b8f28d14a552a6340 /test/CXX/expr/expr.unary/expr.unary.noexcept/sema.cpp | |
parent | ea266cad53e3d49771fa38103913d3ec7a166694 (diff) | |
download | FreeBSD-src-952eddef9aff85b1e92626e89baaf7a360e2ac85.zip FreeBSD-src-952eddef9aff85b1e92626e89baaf7a360e2ac85.tar.gz |
Vendor import of clang release_34 branch r197841 (effectively, 3.4 RC3):
https://llvm.org/svn/llvm-project/cfe/branches/release_34@197841
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 | 9 |
1 files changed, 8 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 1f5969d..427e8c5 100644 --- a/test/CXX/expr/expr.unary/expr.unary.noexcept/sema.cpp +++ b/test/CXX/expr/expr.unary/expr.unary.noexcept/sema.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -fsyntax-only -verify -std=c++11 -fms-extensions %s +// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -fsyntax-only -verify -std=c++11 -fms-extensions -Wno-delete-incomplete %s // expected-no-diagnostics #define P(e) static_assert(noexcept(e), "expected nothrow") @@ -39,6 +39,9 @@ void (*pallspec)() throw(...); void (*pintspec)() throw(int); void (*pemptyspec)() throw(); +typedef void (*funcptr)(); +funcptr returnsptr() throw(); + void callptr() { N(pnospec()); N((*pnospec)()); @@ -48,6 +51,7 @@ void callptr() { N((*pintspec)()); P(pemptyspec()); P((*pemptyspec)()); + N(returnsptr()()); } struct S1 { @@ -91,6 +95,8 @@ struct S2 { void *operator new(__typeof__(sizeof(int)) sz, int) throw(); +struct IncompleteStruct; + struct Bad1 { ~Bad1() throw(int); }; @@ -104,6 +110,7 @@ void implicits() { N(new int); P(new (0) int); P(delete (int*)0); + P(delete (IncompleteStruct*)0); N(delete (Bad1*)0); N(delete (Bad2*)0); N(S2()); |