1762bb9d0ad20320b9f97a841dce57ba5e8e48b07Richard Smith// RUN: %clang_cc1 -std=c++11 -fexceptions -fcxx-exceptions -fsyntax-only -verify %s 256fb926c93786739cfd0867e7ada31ace3bda946Sebastian Redl 356fb926c93786739cfd0867e7ada31ace3bda946Sebastian Redl// We use pointer assignment compatibility to test instantiation. 456fb926c93786739cfd0867e7ada31ace3bda946Sebastian Redl 556fb926c93786739cfd0867e7ada31ace3bda946Sebastian Redltemplate <int N> void f1() throw(int); 656fb926c93786739cfd0867e7ada31ace3bda946Sebastian Redltemplate <int N> void f2() noexcept(N > 1); 756fb926c93786739cfd0867e7ada31ace3bda946Sebastian Redl 856fb926c93786739cfd0867e7ada31ace3bda946Sebastian Redlvoid (*t1)() throw(int) = &f1<0>; 956fb926c93786739cfd0867e7ada31ace3bda946Sebastian Redlvoid (*t2)() throw() = &f1<0>; // expected-error {{not superset}} 1056fb926c93786739cfd0867e7ada31ace3bda946Sebastian Redl 1156fb926c93786739cfd0867e7ada31ace3bda946Sebastian Redlvoid (*t3)() noexcept = &f2<2>; // no-error 1256fb926c93786739cfd0867e7ada31ace3bda946Sebastian Redlvoid (*t4)() noexcept = &f2<0>; // expected-error {{not superset}} 13