erichkeane added a comment.

In D146178#4199263 <https://reviews.llvm.org/D146178#4199263>, @erichkeane 
wrote:

> After a night of sleeping on it, the use of a AdjustConstraintDepth::Diff and 
> AdjustConstraintDepth::Value feels like a hacky solution to SOMETHING here, 
> though I'm not sure what yet. The depth of a template shouldn't change 
> between the equality and constraint checking, it is usually a property of the 
> specialization level.  I could definitely believe that 
> `getTemplateInstantiationArgs` needs some sort of change here to better 
> detect its own state, but this solution doesn't seem right to me.

I debugged a bit: It isn't correct I think that `FunctionTemplateDecl` doesn't 
pick up its template arguments in `getTemplateInstantiationArgs`.  
Additionally, instead of picking up its `DeclContext`, it probably needs its 
`LexicalDeclContext` as the next step, which I believe fixes the problem (plus 
your change in SemaOverload.cpp)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146178/new/

https://reviews.llvm.org/D146178

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to