// RUN: %clang_cc1 -std=c++2a -x c++ %s -verify
namespaceuse_after_instantiation{template<int&R>structA{staticconstexprint&value = R;};template<typename=void>autoS(){staticint s;return A<s>{};}auto&s =decltype(S())::value;// This is ill-formed, but it should not crash.
// FIXME: Right now, it does crash.
// expected-no-diagnostics
#if0
template<typename = void> auto T() {
static int s;
struct A {
static constexpr int &value = s; // expected-error {{static}}
};
return A{};
}
auto &t = decltype(T())::value;
#endif}