llvm-project/clang-tools-extra/test/include-fixer
Sam McCall 9c5ebf7039 [include-fixer] Add fuzzy SymbolIndex, where identifier needn't match exactly.
Summary:
Add fuzzy SymbolIndex, where identifier needn't match exactly.

The purpose for this is global autocomplete in clangd. The query will be a
partial identifier up to the cursor, and the results will be suggestions.

It's in include-fixer because:

  - it handles SymbolInfos, actually SymbolIndex is exactly the right interface
  - it's a good harness for lit testing the fuzzy YAML index
  - (Laziness: we can't unit test clangd until reorganizing with a tool/ dir)

Other questionable choices:

  - FuzzySymbolIndex, which just refines the contract of SymbolIndex. This is
    an interface to allow extension to large monorepos (*cough*)
  - an always-true safety check that Identifier == Name is removed from
    SymbolIndexManager, as it's not true for fuzzy matching
  - exposing -db=fuzzyYaml from include-fixer is not a very useful feature, and
    a non-orthogonal ui (fuzziness vs data source). -db=fixed is similar though.

Reviewers: bkramer

Subscribers: cfe-commits, mgorny

Differential Revision: https://reviews.llvm.org/D30720

llvm-svn: 297630
2017-03-13 15:55:59 +00:00
..
Inputs [include-fixer] Add fuzzy SymbolIndex, where identifier needn't match exactly. 2017-03-13 15:55:59 +00:00
commandline_options.cpp Remove most instances of REQUIRES: shell from the tools/extra tests 2016-08-16 16:07:46 +00:00
exit_on_fatal.cpp Remove most instances of REQUIRES: shell from the tools/extra tests 2016-08-16 16:07:46 +00:00
fixeddb.cpp Remove most instances of REQUIRES: shell from the tools/extra tests 2016-08-16 16:07:46 +00:00
include_path.cpp Remove most instances of REQUIRES: shell from the tools/extra tests 2016-08-16 16:07:46 +00:00
merge.test [include-fixer] Remove line number from Symbol identity 2017-03-09 10:47:44 +00:00
multiple_fixes.cpp [include-fixer] Support processing multiple files in one run. 2016-08-09 08:26:19 +00:00
prefix_variable.cpp Remove most instances of REQUIRES: shell from the tools/extra tests 2016-08-16 16:07:46 +00:00
query_symbol.cpp [include-fixer] Support finding headers for the symbol under cursor. 2016-09-07 16:34:35 +00:00
ranking.cpp Improve include fixer's ranking by taking the paths into account. 2017-01-11 10:32:47 +00:00
yaml_fuzzy.cpp [include-fixer] Add fuzzy SymbolIndex, where identifier needn't match exactly. 2017-03-13 15:55:59 +00:00
yamldb.cpp Remove most instances of REQUIRES: shell from the tools/extra tests 2016-08-16 16:07:46 +00:00
yamldb_autodetect.cpp Remove most instances of REQUIRES: shell from the tools/extra tests 2016-08-16 16:07:46 +00:00
yamldb_plugin.cpp [include-fixer] Don't skip repeated lookups in plugin mode. 2016-11-30 14:37:40 +00:00