================ @@ -285,7 +286,8 @@ Response HandleFunction(Sema &SemaRef, const FunctionDecl *Function, // If this function was instantiated from a specialized member that is // a function template, we're done. assert(Function->getPrimaryTemplate() && "No function template?"); - if (Function->getPrimaryTemplate()->isMemberSpecialization()) + if (!ForDefaultArgumentSubstitution && + Function->getPrimaryTemplate()->isMemberSpecialization()) ---------------- zyn0217 wrote:
Filed https://github.com/llvm/llvm-project/issues/105462 and let's focus on this PR again. Despite that, I now realize using `(ForConstraintInstantiation || !RelativeToPrimary)` is probably unfeasible. The noexcept specifier would expect an end after such template specialization because it doesn't *copy* the expression from the primary declaration, which makes it impossible to refer to primary template parameters. How about proceeding with the new bool flag and refactoring the function to use enums in the next next (the refactoring never ends ;) PR? As that would entail a lot of changes from other files, we can make the review easier https://github.com/llvm/llvm-project/pull/104911 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits