This is an archive of the discontinued LLVM Phabricator instance.

[clangd] PreamblePatch should be no-op if includes arent patched
ClosedPublic

Authored by kadircet on Sep 16 2021, 6:44 AM.

Details

Summary

Don't create a useless functional patch with only filename in it when
there is only include directives to be patched but they're not
requested.

Diff Detail

Event Timeline

kadircet created this revision.Sep 16 2021, 6:44 AM
kadircet requested review of this revision.Sep 16 2021, 6:44 AM
sammccall accepted this revision.Sep 16 2021, 7:29 AM
sammccall added inline comments.
clang-tools-extra/clangd/Preamble.cpp
462–463

I think =MacroDirectives would be significantly clearer than !=All, and a little less fragile

This revision is now accepted and ready to land.Sep 16 2021, 7:29 AM
This revision was automatically updated to reflect the committed changes.
kadircet marked an inline comment as done.