[PATCH] D155858: Add a concept AST node.
Jens Massberg via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 22 04:23:09 PDT 2023
massberg marked 2 inline comments as done.
massberg 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)
----------------
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?
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