This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Do not offer "Add using" tweak in header files.
ClosedPublic

Authored by adamcz on May 6 2020, 6:26 AM.

Diff Detail

Event Timeline

adamcz created this revision.May 6 2020, 6:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 6 2020, 6:26 AM
sammccall accepted this revision.May 6 2020, 6:32 AM
sammccall added inline comments.
clang-tools-extra/clangd/refactor/tweaks/AddUsing.cpp
181

can you use isHeaderFile instead? (in SourceCode.h)

clang-tools-extra/clangd/unittests/TweakTests.cpp
2471

no need for this extra test if using isHeaderFile

This revision is now accepted and ready to land.May 6 2020, 6:32 AM
adamcz updated this revision to Diff 262364.May 6 2020, 6:41 AM
adamcz marked 2 inline comments as done.

Addressed review comments

clang-tools-extra/clangd/unittests/TweakTests.cpp
2471

I'd argue there is a need for this test - if only to check that we are, in fact, using isHeaderFile() or something equivalent :-)

I can delete it if you want, but I think it's better this way.

This revision was automatically updated to reflect the committed changes.