kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land.
thanks, lgtm! ================ Comment at: clang-tools-extra/clangd/IncludeCleaner.cpp:131 + const auto *MostRecent = RD->getMostRecentDecl(); + if (SM.isInMainFile(MostRecent->getBeginLoc())) { + if (const auto *Definition = RD->getDefinition()) ---------------- nit: I'd just inline `RD->getMostRecentDecl()` here. ================ Comment at: clang-tools-extra/clangd/unittests/IncludeCleanerTests.cpp:42 }, + { + "class ^X {}; class ^X;", ---------------- might be worth having a fixme comment here (around we should ignore all re-decls when we can see a def) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114864/new/ https://reviews.llvm.org/D114864 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits