[CI] Detect step failures in metrics job (#122564)
[llvm-project.git] / clang / test / CXX / temp / temp.spec / temp.inst / p7.cpp
blob5145dafdc5b4f1e6b0ba40f18a3e73e04aaa1de4
1 // RUN: %clang_cc1 -verify -std=c++17 %s
3 template<typename T> constexpr int f() { return T::value; } // expected-error {{'::'}}
4 template<bool B, typename T> void g(decltype(B ? f<T>() : 0));
5 template<bool B, typename T> void g(...);
6 template<bool B, typename T> void h(decltype(int{B ? f<T>() : 0})); // expected-note {{instantiation of}}
7 template<bool B, typename T> void h(...);
8 void x() {
9 g<false, int>(0); // ok
10 g<true, int>(0); // ok
11 h<false, int>(0); // expected-note {{while substituting}}