[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / CXX / except / except.spec / template.cpp
blob805a604db5882c67712b8db3961b42cccaf90596
1 // RUN: %clang_cc1 -std=c++11 -fexceptions -fcxx-exceptions -fsyntax-only -verify %s
3 // We use pointer assignment compatibility to test instantiation.
5 template <int N> void f1() throw(int);
6 template <int N> void f2() noexcept(N > 1);
8 void (*t1)() throw(int) = &f1<0>;
9 void (*t2)() throw() = &f1<0>; // expected-error {{not superset}}
11 void (*t3)() noexcept = &f2<2>; // no-error
12 void (*t4)() noexcept = &f2<0>; // expected-error {{not superset}}