[PATCH] D79488: [clangd] Do not offer "Add using" tweak in header files.

2020-05-06 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz updated this revision to Diff 262364. adamcz marked 2 inline comments as done. adamcz added a comment. Addressed review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79488/new/ https://reviews.llvm.org/D79488 Files: clang-tools-e

[PATCH] D79488: [clangd] Do not offer "Add using" tweak in header files.

2020-05-06 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG319787315dd6: [clangd] Do not offer "Add using" tweak in header files. (authored by adamcz, committed by sammccall). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D79488: [clangd] Do not offer "Add using" tweak in header files.

2020-05-06 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz added inline comments. 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(); }"); sammcc

[PATCH] D79488: [clangd] Do not offer "Add using" tweak in header files.

2020-05-06 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz created this revision. adamcz added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. sammccall accepted this revision. This revision is now accepted and ready to land. adamcz updated

[PATCH] D79488: [clangd] Do not offer "Add using" tweak in header files.

2020-05-06 Thread Sam McCall via Phabricator via cfe-commits
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.