// RUN: %clang_cc1 %s -verify #if !__has_cpp_attribute(clang::no_specializations) # error #endif struct [[clang::no_specializations]] S {}; // expected-warning {{'clang::no_specializations' attribute only applies to class templates, function templates, and variable templates}} template struct [[clang::no_specializations]] is_same { // expected-note 2 {{marked 'clang::no_specializations' here}} static constexpr bool value = __is_same(T, U); }; template using alias [[clang::no_specializations]] = T; // expected-warning {{'clang::no_specializations' attribute only applies to class templates, function templates, and variable templates}} template <> struct is_same {}; // expected-error {{'is_same' cannot be specialized}} template struct Template {}; template struct is_same, Template > {}; // expected-error {{'is_same' cannot be specialized}} bool test_instantiation1 = is_same::value; template [[clang::no_specializations]] inline constexpr bool is_same_v = __is_same(T, U); // expected-note 2 {{marked 'clang::no_specializations' here}} template <> inline constexpr bool is_same_v = false; // expected-error {{'is_same_v' cannot be specialized}} template inline constexpr bool is_same_v