llvm-project/clang-tools-extra/include-fixer
Haojian Wu 0e1a50e9c4 Overhaul clang-include-fixer.el
General overhaul to fix many coding bugs, simplify the code, and improve readability.

* Clarify documentation strings of user options.
* Say that clang-include-fixer-executable is a file to have auto completion.
* Allow user to select available options for clang-include-fixer-input-format. Turn it into a symbol as it's not a free-form string.
* Remove clang-include-fixer-query-mode. This option was apparently used to select between two different operation modes, which is not a typical use case for user options. Provide two separate commands instead.
* Add a face for the overlay highlighting so that users can customize it.
Move user commands to the front so that readers of the code aren't buried in internal functions.
* Make process calls asynchronous. This is possible here because clang-include-fixer doesn't change files in place. This means input is no longer blocked while clang-include-fixer is running.
* Factor out logic in helper functions to keep functions short.
* Add comments where appropriate.
* Provide an alternative buffer replacement strategy for the case that a single line was inserted (the normal case in the case of clang-include-fixer). This keeps point, markers, and other buffer information intact.
* Use let-alist and association lists instead of property lists to shorten the code.
* Instead of highlighting only the first occurrence of a symbol, highlight all occurrences and move point to the closest one.
* Detect qualified names at point.
* Use filepos-to-bufferpos if available.
* Formatting.

Patch by Philipp Stephani!

llvm-svn: 283306
2016-10-05 10:04:13 +00:00
..
find-all-symbols [include-fixer] Support finding headers for the symbol under cursor. 2016-09-07 16:34:35 +00:00
tool Overhaul clang-include-fixer.el 2016-10-05 10:04:13 +00:00
CMakeLists.txt [include-fixer] Pull out Context implementation code to a cpp file. 2016-07-08 13:11:38 +00:00
InMemorySymbolIndex.cpp [include-fixer] Simplify unittest code. 2016-05-13 15:17:17 +00:00
InMemorySymbolIndex.h [include-fixer] Simplify unittest code. 2016-05-13 15:17:17 +00:00
IncludeFixer.cpp [include-fixer] Support processing multiple files in one run. 2016-08-09 08:26:19 +00:00
IncludeFixer.h Fix Wdocumentation unknown parameter warning 2016-08-09 10:02:11 +00:00
IncludeFixerContext.cpp [include-fixer] Support processing multiple files in one run. 2016-08-09 08:26:19 +00:00
IncludeFixerContext.h [include-fixer] Support processing multiple files in one run. 2016-08-09 08:26:19 +00:00
SymbolIndex.h [include-fixer] Rename XrefsDB to SymbolIndex. 2016-05-13 09:27:54 +00:00
SymbolIndexManager.cpp [include-fixer] Correct nested class search for identifiers with scoped information 2016-08-02 10:43:10 +00:00
SymbolIndexManager.h [include-fixer] Correct nested class search for identifiers with scoped information 2016-08-02 10:43:10 +00:00
YamlSymbolIndex.cpp [include-fixer] Rename XrefsDB to SymbolIndex. 2016-05-13 09:27:54 +00:00
YamlSymbolIndex.h [include-fixer] Rename XrefsDB to SymbolIndex. 2016-05-13 09:27:54 +00:00