sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land.
================ Comment at: clang-tools-extra/clangd/refactor/tweaks/AddUsing.cpp:181 + const auto FileName = SM.getFileEntryForID(SM.getMainFileID())->getName(); + if (FileName.endswith(".h") || FileName.endswith(".hpp")) { + return false; ---------------- can you use isHeaderFile instead? (in SourceCode.h) ================ Comment at: clang-tools-extra/clangd/unittests/TweakTests.cpp:2471 + EXPECT_UNAVAILABLE(Header + "void fun() { one::two::f^f(); }"); + FileName = "test.hpp"; + EXPECT_UNAVAILABLE(Header + "void fun() { one::two::f^f(); }"); ---------------- no need for this extra test if using isHeaderFile Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79488/new/ https://reviews.llvm.org/D79488 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits