[PATCH] D71020: [ASTImporter] Friend class decl should not be visible in its context
Gabor Marton via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 12 13:26:03 PST 2019
martong added inline comments.
================
Comment at: clang/lib/AST/ASTImporter.cpp:334
+ FromDC->lookup(FromNamed->getDeclName());
+ if (std::find(FromLookup.begin(), FromLookup.end(), FromNamed) !=
+ FromLookup.end())
----------------
a_sidorin wrote:
> llvm::is_contained?
Thanks! Good catch.
================
Comment at: clang/unittests/AST/ASTImporterTest.cpp:258
+static const RecordDecl *getRecordDeclOfFriend(FriendDecl *FD) {
+ QualType Ty = FD->getFriendType()->getType();
+ if (auto *Inner = dyn_cast<TypedefType>(Ty.getTypePtr())) {
----------------
a_sidorin wrote:
> Why don't we use getCanonicalType() anymore?
Thanks, that is a very good catch.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71020/new/
https://reviews.llvm.org/D71020
More information about the cfe-commits
mailing list