a_sidorin added a comment.

Hi Gabor,
The change is OK but I have some questions regarding tests.



================
Comment at: unittests/AST/ASTImporterTest.cpp:2495
+      FirstDeclMatcher<FieldDecl>().match(ToTU, fieldDecl(hasName("entry1")));
+  auto getRecordDecl = [](FieldDecl *FD) {
+    auto *ET = cast<ElaboratedType>(FD->getType().getTypePtr());
----------------
There is already a similar lambda definitions for `getRecordDecl()` in 
ObjectsWithUnnamedStructType test. Can we make it a function, like it is done 
for StructuralEquivalenceContext?


================
Comment at: unittests/AST/StructuralEquivalenceTest.cpp:581
+  ASSERT_NE(R0, R1);
+  EXPECT_TRUE(testStructuralMatch(R0, R0));
+  EXPECT_TRUE(testStructuralMatch(R1, R1));
----------------
Do we really want to test the equivalence of decl to itself, not to its 
imported version?


Repository:
  rC Clang

https://reviews.llvm.org/D49296



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

Reply via email to