[PATCH] D49798: [ASTImporter] Adding some friend function related unittests.
Aleksei Sidorin via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 15 17:03:46 PDT 2018
a_sidorin added a comment.
Hi Balasz,
Thank you for the fixes.
================
Comment at: unittests/AST/ASTImporterTest.cpp:2258
+ ASSERT_EQ(lookup_res.size(), 0u);
+ lookup_res = cast<TranslationUnitDecl>(FromTU)->noload_lookup(FromName);
+ ASSERT_EQ(lookup_res.size(), 1u);
----------------
a_sidorin wrote:
> getTuDecl() already return `TranslationUnitDecl *`. We should just declare `FromTU` as `auto *`, so no cast is needed here.
Marked as Done, but not actually done.
================
Comment at: unittests/AST/ASTImporterTest.cpp:2294
+ Lang_CXX, "input0.cc");
+ auto From0 = FirstDeclMatcher<FunctionDecl>().match(FromTU, Pattern);
+ auto From1 = LastDeclMatcher<FunctionDecl>().match(FromTU, Pattern);
----------------
a_sidorin wrote:
> Names like FromFriendFunc/FromNormalFunc will make the test more readable.
Gentle ping on this.
Repository:
rC Clang
https://reviews.llvm.org/D49798
More information about the cfe-commits
mailing list