martong added inline comments.

================
Comment at: clang/lib/AST/ASTImporter.cpp:9010
+      ToPath[Idx] =
+          cast<const CXXRecordDecl>(const_cast<Decl *>(ImpDecl.get()));
+    }
----------------
Tyker wrote:
> rsmith wrote:
> > We want the path in an `APValue` to be canonical, but importing a canonical 
> > decl might result in a non-canonical decl.
> > but importing a canonical decl might result in a non-canonical decl.
> this is a quite surprising behavior.
> > but importing a canonical decl might result in a non-canonical decl.
> this is a quite surprising behavior.

If you already have an existing redecl chain in the destination ASTContext 
(let's say A->B->C, A is the canonical decl), then importing a canonical decl 
(let's say D) would result an A->B->C->D' chain. Where D' is the imported 
version of D.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D63640

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

Reply via email to