This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Dex: add Corpus factory for iterators, rename, fold constant. NFC
ClosedPublic

Authored by sammccall on Oct 1 2018, 2:47 AM.

Details

Summary
  • Corpus avoids having to pass size to the true iterator, and (soon) any iterator that might optimize down to true.
  • Shorten names of factory functions now they're scoped to the Corpus. intersect() and unionOf() rather than createAnd() or createOr() as this seems to read better to me, and fits with other short names. Opinion wanted!
  • DEFAULT_BOOST_SCORE --> 1. This is a multiplier, don't obfuscate identity.
  • Simplify variadic templates in Iterator.h

Diff Detail

Repository
rL LLVM

Event Timeline

sammccall created this revision.Oct 1 2018, 2:47 AM
ioeric accepted this revision.Oct 2 2018, 3:09 AM
ioeric added inline comments.
clangd/index/dex/Iterator.h
131 ↗(On Diff #167687)

Maybe make this a constant and initialize it via a constructor?

This revision is now accepted and ready to land.Oct 2 2018, 3:09 AM
This revision was automatically updated to reflect the committed changes.
sammccall marked an inline comment as done.