[PATCH] D28548: Improve include fixer's ranking by taking the paths into account.
Manuel Klimek via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 11 01:59:09 PST 2017
klimek created this revision.
klimek added a reviewer: bkramer.
klimek added a subscriber: cfe-commits.
Instead of just using popularity, we also take into account how similar the
path of the current file is to the path of the header.
Our first approach is to get popularity into a reasonably small scale by taking
log2 (which is roughly intuitive to how humans would bucket popularity), and
multiply that with the number of matching prefix path fragments of the included
header with the current file.
Note that currently we do not take special care for unclean paths containing
"../" or "./".
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 8024 bytes
Desc: not available
More information about the cfe-commits