[AMDGPU] Removed superfluous predicate. NFC.
[llvm-project.git] / clang / test / SemaTemplate / class-template-noexcept.cpp
blob5c4ac090f3166df003e20e914db69bbc5982befd
1 // RUN: %clang_cc1 -verify %s
2 // RUN: %clang_cc1 -std=c++11 -verify %s
3 // RUN: %clang_cc1 -std=c++17 -verify %s
4 // RUN: %clang_cc1 -std=c++1z -verify %s
5 #if __cplusplus >= 201703
6 // expected-no-diagnostics
7 #endif
8 class A {
9 public:
10 static const char X;
12 const char A::X = 0;
14 template<typename U> void func() noexcept(U::X);
16 template<class... B, char x>
17 #if __cplusplus >= 201703
18 void foo(void(B...) noexcept(x)) {}
19 #else
20 void foo(void(B...) noexcept(x)) {} // expected-note{{candidate template ignored}}
21 #endif
23 void bar()
25 #if __cplusplus >= 201703
26 foo(func<A>);
27 #else
28 foo(func<A>); // expected-error{{no matching function for call}}
29 #endif