summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/include-fixer/tool/clang-include-fixer-test.el
Commit message (Collapse)AuthorAgeFilesLines
* Rename directory housing clang-include-fixer to be eponymousNico Weber2019-03-251-65/+0
| | | | | | | | | | | Makes the name of this directory consistent with the names of the other directories in clang-tools-extra. Similar to r356254. No intended behavior change. Differential Revision: https://reviews.llvm.org/D59750 llvm-svn: 356897
* Do not display highlights for clang-include-fixer-at-pointHaojian Wu2017-03-061-0/+11
| | | | | | | | | | | | | | Summary: When invoking clang-include-fixer-at-point, the QuerySymbolInfos point to offset 0, length 0. Rather than showing a hidden overlay, do not show any overlay at all for zero-length symbols. Patch by Torsten Marek! Reviewers: hokein, klimek Reviewed By: hokein Differential Revision: https://reviews.llvm.org/D30577 llvm-svn: 297010
* Make clang-include-fixer--insert-line work when the difference is on an ↵Manuel Klimek2017-02-231-0/+12
| | | | | | | | | | | | | | | | | | empty line `clang-include-fixer--insert-line` has an off-by-one error because it uses `(goto-char (point-min)) (forward-char chars)`, which is (goto-char (1+ chars))`. Because of this, when the first difference was on an empty line (i.e. an include was appended to the block of includes), the pointer in the `to` buffer would be on the next line. Also wrapped calls inside another process sentinel inside `with-local-quit`. Patch by Torsten Marek. Differential Revision: https://reviews.llvm.org/D30292 llvm-svn: 295988
* Load clang-include-fixer.el from the unit test suite so that the unit tests ↵Manuel Klimek2016-10-251-0/+2
| | | | | | | | can run in batch mode. Patch by Philipp Stephani. llvm-svn: 285059
* Overhaul clang-include-fixer.elHaojian Wu2016-10-051-0/+40
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
OpenPOWER on IntegriCloud