This is an archive of the discontinued LLVM Phabricator instance.

[NFC] Cleanup Dex
ClosedPublic

Authored by kbobyrev on Aug 31 2018, 1:14 AM.

Details

Summary
  • Use consistent assertion messages in iterators implementations
  • Silence a bunch of clang-tidy warnings: use emplace_back instead of push_back where possible, make sure arguments have the same name in header and implementation file, use for loop over ranges where possible

Diff Detail

Repository
rL LLVM

Event Timeline

kbobyrev created this revision.Aug 31 2018, 1:14 AM

The next step would be to move Dex to index/ and slightly simplify file structure, but I guess I should consider doing that after D51422 lands, otherwise it's a lot of effort to keep rebasing everything on top of different patches.

ioeric accepted this revision.Aug 31 2018, 1:34 AM
ioeric added inline comments.
clang-tools-extra/clangd/index/dex/DexIndex.cpp
33 ↗(On Diff #163473)

Do you still need to spell out the constructor with emplace_back?

clang-tools-extra/clangd/index/dex/Iterator.cpp
395 ↗(On Diff #163473)

No need for make_pair here?

This revision is now accepted and ready to land.Aug 31 2018, 1:34 AM
kbobyrev updated this revision to Diff 163485.Aug 31 2018, 2:09 AM
kbobyrev marked 2 inline comments as done.
This revision was automatically updated to reflect the committed changes.