[PATCH] D53697: [ASTImporter][Structural Eq] Check for isBeingDefined

Aleksei Sidorin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 26 15:30:36 PDT 2018


a_sidorin added a comment.

Hi Gabor,
I wonder if it is possible to get into situation where non-equivalent decls are marked equivalent with this patch?  If yes, we can create a mapping between decls being imported and original decls as an alternative solution. However,  I cannot find any counterexample.



================
Comment at: lib/AST/ASTStructuralEquivalence.cpp:1037
+  // equality and we assume that the decls are equal.
+  if (D1->isBeingDefined() || D2->isBeingDefined())
+    return true;
----------------
Is it worth it to assert if only one Decl should be in `isBeingDefined()` state at time?


================
Comment at: unittests/AST/ASTImporterTest.cpp:3729
 
+TEST_P(ASTImporterTestBase, ImportingTypedefShouldImportTheCompleteType) {
+  // We already have an incomplete underlying type in the "To" context.
----------------
Looks like this test is from another patch (D53693)?


Repository:
  rC Clang

https://reviews.llvm.org/D53697





More information about the cfe-commits mailing list