| 1 |
// RUN: %clang_cc1 -std=c++1z -fexceptions -fcxx-exceptions -fsyntax-only -verify %s |
| 2 |
|
| 3 |
// In C++1z, we can put an exception-specification on any function declarator; the |
| 4 |
// corresponding paragraph from C++14 and before was deleted. |
| 5 |
// expected-no-diagnostics |
| 6 |
|
| 7 |
void f() noexcept; |
| 8 |
void (*fp)() noexcept; |
| 9 |
void (**fpp)() noexcept; |
| 10 |
void g(void (**pfa)() noexcept); |
| 11 |
void (**h())() noexcept; |
| 12 |
|
| 13 |
template<typename T> struct A {}; |
| 14 |
template<void() noexcept> struct B {}; |
| 15 |
A<void() noexcept> a; |
| 16 |
B<f> b; |
| 17 |
auto *p = new decltype(f)**; |