steakhal added inline comments.

================
Comment at: clang/lib/AST/ASTImporter.cpp:1493
+    const SubstTemplateTypeParmPackType *T) {
+  ExpectedType ReplacedOrErr = import(QualType(T->getReplacedParameter(), 0));
+  if (!ReplacedOrErr)
----------------
martong wrote:
> steakhal wrote:
> > I know it's somewhat ugly, but it gets the job done.
> > There are other instances like this already.
> It is unfortunate that we can't we import the `Type` ptr directly and we must 
> create a qualified type with meaningless qualifiers. However, we use the very 
> same methods for `VisitSubstTemplateTypeParmType` so, this is okay for now. 
> Perhaps, in a later patch it would make sense to create an `import` overload 
> that returns and `Exptected<Type*>` and takes `Type*` as a param. That could 
> simplify this line and the `cast` below.
D109269 aims to address this.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109237

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

Reply via email to