balazske added inline comments.
================ Comment at: clang/lib/AST/ASTImporter.cpp:4087 + + if (TypeSourceInfo *TSI = FD1->getFriendType()) + return Importer.IsStructurallyEquivalent( ---------------- This can be `const`? ================ Comment at: clang/lib/AST/ASTImporter.cpp:4105 - T TypeOrDecl = GetCanTypeOrDecl(FD); - - for (const FriendDecl *FoundFriend : RD->friends()) { + for (FriendDecl *FoundFriend : RD->friends()) { if (FoundFriend == FD) { ---------------- It is better if this is `const`. ================ Comment at: clang/lib/AST/ASTImporter.cpp:4130 SmallVector<FriendDecl *, 2> ImportedEquivalentFriends; - - while (ImportedFriend) { - bool Match = false; - if (D->getFriendDecl() && ImportedFriend->getFriendDecl()) { - Match = - IsStructuralMatch(D->getFriendDecl(), ImportedFriend->getFriendDecl(), - /*Complain=*/false); - } else if (D->getFriendType() && ImportedFriend->getFriendType()) { - Match = Importer.IsStructurallyEquivalent( - D->getFriendType()->getType(), - ImportedFriend->getFriendType()->getType(), /*Complain=*/false); - } - if (Match) + for (auto *ImportedFriend : RD->friends()) + if (IsEquivalentFriend(Importer, D, ImportedFriend)) ---------------- `auto` should be replaced here Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157684/new/ https://reviews.llvm.org/D157684 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits