[PATCH] D146178: [Clang][Sema] Fix comparison of constraint expressions
Erich Keane via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 16 06:44:13 PDT 2023
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
More information about the llvm-commits
mailing list