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

Chuanqi Xu via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Sep 1 20:07:52 PDT 2022


ChuanqiXu added inline comments.


================
Comment at: clang/lib/Serialization/ASTWriterDecl.cpp:623-626
+  VisitDeclaratorDecl(D);
+  Record.AddDeclarationNameLoc(D->DNLoc, D->getDeclName());
+  Record.push_back(D->getIdentifierNamespace());
+
----------------
mizvekov wrote:
> ChuanqiXu wrote:
> > I still don't get the reason for the move. What's the benefit? Or why is it necessary?
> Yeah, now the type can reference the template decl, so without moving this, it can happen during import of the type that we try to read this function template bits without having imported them yet.
Oh, I guess I met the problem before (D129748 ) and I made a workaround for it (https://reviews.llvm.org/D130331). If I understood right, the patch will solve that problem. I'll check it out later.

(This kind of code move looks dangerous you know and I'll take a double check)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131858



More information about the libcxx-commits mailing list