[PATCH] D105354: [clang][AST] Add support for DecompositionDecl to ASTImporter.

Gabor Marton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 5 08:59:21 PDT 2021


martong added inline comments.


================
Comment at: clang/lib/AST/ASTImporter.cpp:2305-2309
+  BindingDecl *ToD;
+  if (GetImportedOrCreateDecl(ToD, D, Importer.getToContext(), DC, Loc,
+                              Name.getAsIdentifierInfo()))
+    return ToD;
+
----------------
So, we moved the import of the binding before importing the decomposition decl to avoid an infinite recursion. But why can't we have an infinit recursion this way?

Perhaps, it would be useful to have a test case that triggered the infinity in case of the original order of the import calls.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105354



More information about the cfe-commits mailing list