[clang] [Clang] Address feedback in PR183010 (PR #185608)

Corentin Jabot via cfe-commits cfe-commits at lists.llvm.org
Sat Mar 14 01:49:05 PDT 2026


================
@@ -1185,7 +1154,7 @@ static bool CheckConstraintSatisfaction(
     return false;
   }
 
-  if (TemplateArgsLists.isAnyArgInstantiationDependent(S.Context)) {
+  if (TemplateArgsLists.isAnyArgDependent(S.Context)) {
----------------
cor3ntin wrote:

The first example (parameter unused) is conforming. I believe all of the other examples are IFNDR.
So we should make some effort to diagnose, but not doing it is still, strictly speaking, conforming, afaict.

However the original regression... we are just failing to compile relatively trivial standard conforming code.
No not fixing the original regression is, imo, definitively worse. 

It seemed that @zygoloid had some idea for an alternative solution to the original PR.
I'm not sure any of us actually understood the suggestion though. 

Maybe just `C.getCanonicalTemplateArgument(TA).isDependent()` (which would works for expressions, expression canonicalization just returns the expression).

But it is possible I misunderstood. In particular this does not address Matheus' examples.
But I think these examples are unrelated as they are incorrectly compiled with or without the patches Younan has been working on.

These are symptoms of not preserving sugar in the mapping - the goal being to improve caching and minimize the performance concerns. I feel we are between a rock and a hard place here.

Either way, I'd still like to see the original issue resolved independently of the issue of undiagnosed incorrect substitution in aliases.

https://github.com/llvm/llvm-project/pull/185608


More information about the cfe-commits mailing list