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

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

Reply via email to