[PATCH] D80743: (PR46111) Properly handle elaborated types in an implicit deduction guide

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 11 19:15:53 PDT 2020


erichkeane marked an inline comment as done.
erichkeane added inline comments.


================
Comment at: clang/lib/Sema/SemaTemplate.cpp:1967
+        TransformType(InnerTLB, OrigDecl->getTypeSourceInfo()->getTypeLoc());
+    TypeSourceInfo *TSI = Context.getTrivialTypeSourceInfo(Transformed);
+
----------------
rsmith wrote:
> Retaining the location information here would be good too. (You already have that location info in `InnerTLB`.) I think there might even be a convenience `TypeSourceInfo` -> `TypeSourceInfo` transform you can invoke here.
I think I see what you mean, There is a TypeSourceInfo *TransformType(TypeSourceInfo*) that I can use to do the transform, PLUS doing InnerTLB.getTypeSourceInfo (instead of ASTContext) seems to keep all the required info.

I'll do that before I commit this in the morning.

Thanks again!


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80743/new/

https://reviews.llvm.org/D80743





More information about the cfe-commits mailing list