[PATCH] D137712: Correctly handle Substitution failure in concept specialization.
Erich Keane via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 15 08:39:52 PST 2022
erichkeane added inline comments.
================
Comment at: clang/include/clang/AST/ExprConcepts.h:103
+ bool hasSubstitutionFailureInArgs() const {
+ return ArgsHasSubstitutionFailure;
----------------
usaxena95 wrote:
> erichkeane wrote:
> > Does this really belong here instead of as a part of the ConceptSpecializationDecl?
> I am not aware of the original goals for this. For example, `ASTTemplateArgumentListInfo` is part of `ConceptReference` while `TemplateArgument` is part of `ImplicitConceptSpecializationDecl`. Both of them are invalid in such a case.
> I am open to suggestion to where to place this.
Yeah, the design of all of these is a little wonky unfortunately. The ConceptReference is so it can be a base of a TypeConstraint as well, so anything that also needs to be in type-constraint belongs there.
ConceptSpecializationDecl is a recent split off ConstraintSpecializationExpr whose intent is to be something that later instantiation (like instantiating a lambda defined in a concept decl) can use to make sure we get template arguments correct. So I suspect the args failure needs to be contained in that as well.
IF this is something that can also be invalid in a TypeConstraint, it belongs in ConceptReference AND ConceptSpecializationDecl separately I believe (as we'll likely need to check that's validity later).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137712/new/
https://reviews.llvm.org/D137712
More information about the cfe-commits
mailing list