This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Deduplicate scopes in IncludeFixer queries
ClosedPublic

Authored by kadircet on Feb 3 2021, 5:09 AM.

Diff Detail

Event Timeline

kadircet created this revision.Feb 3 2021, 5:09 AM
kadircet requested review of this revision.Feb 3 2021, 5:09 AM
sammccall accepted this revision.Feb 3 2021, 8:03 AM
sammccall added inline comments.
clang-tools-extra/clangd/IncludeFixer.cpp
316–317

nit: sort+erase-unique is probably cheaper than constructing a set and then copying it

(probably not a huge deal but we do this for each typo I think)

This revision is now accepted and ready to land.Feb 3 2021, 8:03 AM
kadircet updated this revision to Diff 321118.Feb 3 2021, 9:15 AM
  • sort+unique+erase instead of using a set
  • Inline visitor and directly collect scopes there.
kadircet updated this revision to Diff 321120.Feb 3 2021, 9:21 AM
  • add back the global scope.
This revision was automatically updated to reflect the committed changes.