[PATCH] D131858: [clang] Track the templated entity in type substitution.

Matheus Izvekov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 1 04:30:51 PDT 2022


mizvekov added inline comments.


================
Comment at: clang/lib/AST/ASTImporter.cpp:3748-3751
+  // If it is a template, import all related things.
+  if (Error Err = ImportTemplateInformation(D, ToFunction))
+    return std::move(Err);
+
----------------
martong wrote:
> What's the reason of moving this hunk?
All the changes here to the ASTImporter revolve around the need to import the template bits before the type, as now the type itself can depend on the templated declaration, and this would cause a cycle otherwise.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131858



More information about the cfe-commits mailing list