[PATCH] D155858: Add a concept AST node.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 22 05:04:46 PDT 2023
sammccall added inline comments.
================
Comment at: clang/lib/Sema/TreeTransform.h:6824-6836
+ unsigned size = TL.getTypePtr()->getTypeConstraintArguments().size();
+ TemplateArgumentLocInfo *TALI = new TemplateArgumentLocInfo[size];
+ TemplateSpecializationTypeLoc::initializeArgLocs(
+ SemaRef.Context, TL.getTypePtr()->getTypeConstraintArguments(), TALI,
+ SourceLocation());
+ TemplateArgumentLoc *TAL = new TemplateArgumentLoc[size];
+ for (unsigned i = 0; i < size; ++i)
----------------
massberg wrote:
> This is very ugly as I have to create the TALI and TAL arrays temporarily to use the existing transformations.
> Is there a better way to do that?
> Moreover, is this the correct place for the transformation? This is necessary as the passed `AutoTypeLoc` doesn't have an attached `ConceptReference` even if it is constrained. Has the `ConceptReferenec`of the original `AutoTypeLoc` be added somewhere earlier?
If I'm understanding the situation right...
the AutoTypeLoc in the template should have a ConceptReference, since the `auto` is constrained.
This seems like a bug to be fixed elsewhere, and then this `else` becomes dead.
Do you have a minimal example?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155858/new/
https://reviews.llvm.org/D155858
More information about the cfe-commits
mailing list