[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / CXX / except / except.spec / p2-places-1z.cpp
blob619ea33b5349b5c590474679a5511dfa5161f660
1 // RUN: %clang_cc1 -std=c++1z -fexceptions -fcxx-exceptions -fsyntax-only -verify %s
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
7 void f() noexcept;
8 void (*fp)() noexcept;
9 void (**fpp)() noexcept;
10 void g(void (**pfa)() noexcept);
11 void (**h())() noexcept;
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)**;