rsmith added a comment. This direction looks promising to me.
================ Comment at: clang/lib/Parse/ParseDeclCXX.cpp:1677-1678 CXXScopeSpec Spec; + if (TemplateInfo.TemplateParams) + Spec.setTemplateParamLists(*TemplateInfo.TemplateParams); + ---------------- I think we'll need some similar logic for out-of-line definitions of member enums too: ``` template<typename T> struct X; template<typename T> concept bool Small = sizeof(T) == 1; template<Small T> struct X<T> { enum class E; }; template<Small T> enum class X<T>::E { e }; ``` More generally, anywhere we might pass `EnteringContext = true`, we probably ought to think about whether we have template parameters to pass in. ================ Comment at: clang/test/CXX/temp/temp.decls/temp.class.spec/temp.class.spec.mfunc/p1-neg.cpp:2-4 +// XFAIL: * +// NOTE: This test is marked XFAIL until the diagnostics of +// too many template parameters is fixed. ---------------- What is the new diagnostic output? (Presumably we no longer match the partial specialization when trying to match the declaration on line 25, because the template parameter list doesn't match.) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145034/new/ https://reviews.llvm.org/D145034 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits