diff --git a/clang/test/CXX/temp/temp.decls/temp.spec.partial/temp.spec.partial.member/p2.cpp b/clang/test/CXX/temp/temp.decls/temp.spec.partial/temp.spec.partial.member/p2.cpp index 9a71da4bae37ca..0536cd23fd9adf 100644 --- a/clang/test/CXX/temp/temp.decls/temp.spec.partial/temp.spec.partial.member/p2.cpp +++ b/clang/test/CXX/temp/temp.decls/temp.spec.partial/temp.spec.partial.member/p2.cpp @@ -27,27 +27,43 @@ static_assert(A::x == 1); template<> template -struct A::B { +struct A::B { static constexpr int y = 2; }; template<> template -struct A::B { +struct A::B { static constexpr int y = 3; }; template<> template -constexpr int A::x = 2; +struct A::B { + static constexpr int y = 4; +}; + +template<> +template +constexpr int A::x = 2; template<> template -constexpr int A::x = 3; - -static_assert(A::B::y == 2); -static_assert(A::B::y == 2); -static_assert(A::B::y == 3); -static_assert(A::x == 2); -static_assert(A::x == 2); -static_assert(A::x == 3); +constexpr int A::x = 3; + +template<> +template +constexpr int A::x = 4; + +static_assert(A::B::y == 2); +static_assert(A::B::y == 2); +static_assert(A::B::y == 3); +static_assert(A::x == 2); +static_assert(A::x == 2); +static_assert(A::x == 3); +static_assert(A::B::y == 0); +static_assert(A::B::y == 1); +static_assert(A::B::y == 4); +static_assert(A::x == 0); +static_assert(A::x == 1); +static_assert(A::x == 4);