diff options
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()); |