================
@@ -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:

Okay, I managed to check every usage of the function where `RelativeToPrimary = 
true`: Most codes are calling it with `ForConstraintInstantiation = true` as 
well, except for two places where `RelativeToPrimary = true` but 
`ForConstraintInstantiation = false`.

One is the default argument substitution, for which we intend to change the 
behavior.

While looking at the other call site, the noexcept specifier substitution, I 
hit upon probably another bug: https://clang.godbolt.org/z/MnYbGKoqP @cor3ntin 
I presume we should accept the code there?

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

Reply via email to