summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/include-fixer/tool/clang-include-fixer.py
Commit message (Collapse)AuthorAgeFilesLines
* Rename directory housing clang-include-fixer to be eponymousNico Weber2019-03-251-208/+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
* Recommit "[include-fixer] Don't throw exception when parsing unknown ar… ↵Haojian Wu2017-05-171-1/+6
| | | | | | | | | | | | | | | | …guments in vim script." Summary: To make it work in neovim. Reviewers: bkramer Reviewed By: bkramer Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D33273 llvm-svn: 303260
* [include-fixer] query-mode should be false by default.Haojian Wu2016-10-101-1/+1
| | | | | | Makes it consistent with documentations. llvm-svn: 283754
* [include-fixer] Support finding headers for the symbol under cursor.Haojian Wu2016-09-071-4/+37
| | | | | | | | | | | | | | Summary: * Add a `query-symbol` option to query symbol without parsing the source file. * Update Vim & Emacs integration scripts. Reviewers: bkramer, massberg Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D24075 llvm-svn: 280824
* [include-fixer] Fix an undefined variable exception in vim script when there isHaojian Wu2016-09-011-0/+1
| | | | | | only one candidate header. llvm-svn: 280359
* [include-fixer] Support processing multiple files in one run.Haojian Wu2016-08-091-15/+10
| | | | | | | | | | | | | | | | | | | Summary: Previously, if we pass multiple files or a file pattern (e.g. /path/to/*.cc) to include-fixer, include-fixer will apply all replacements to the first argument, which probably causes crashes. With this patch, include-fixer can process multiple files now. Vim and Emacs integration are tested manually. Reviewers: bkramer Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D23266 llvm-svn: 278102
* change Vim key binding for include-fixer and clang-renameKirill Bobyrev2016-07-271-3/+3
| | | | | | | | | | | | Change Vim key binding for include-fixer (`,cf` -> `<leader>cf`) and clang-rename (`,cr` -> `<leader>cr`) to use `<leader>` instead of `,` like cool Vim people (tm) do. Reviewers: ioeric Differential Revision: https://reviews.llvm.org/D22854 llvm-svn: 276870
* [include-fixer] Add mising qualifiers to all instances of an unidentified ↵Haojian Wu2016-07-211-8/+7
| | | | | | | | | | | | symbol. Reviewers: bkramer Subscribers: ioeric, cfe-commits Differential Revision: https://reviews.llvm.org/D22567 llvm-svn: 276280
* [include-fixer] A refactoring of IncludeFixerContext.Haojian Wu2016-07-191-5/+4
| | | | | | | | | | | | | | | | | Summary: No functional changes in this patch. It is a refactoring (pull out a structure representing the symbol being queried). This is a preparing step for inserting missing namespace qualifiers to all instances of an unidentified symbol. Reviewers: bkramer Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D22510 llvm-svn: 275980
* [include-fixer] Add an options allow moving the cursor to #include line in vimHaojian Wu2016-07-181-12/+25
| | | | | | | | | | | | | | | | | after inserting a missing header. Summary: A small improvement: Don't print newline character at the end of message, so that users don't have to type ENTER manually after running the python script. Reviewers: bkramer Subscribers: djasper, klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D22351 llvm-svn: 275781
* [include-fixer] Implement adding missing namespace qualifiers in vim ↵Haojian Wu2016-07-131-8/+22
| | | | | | | | | | | | | | | | | integration. Summary: The patch extends include-fixer's "-output-headers", and "-insert-headers" command line options to make it dump more information (e.g. QualifiedSymbol), so that vim-integration can add missing qualifiers. Reviewers: bkramer Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D22299 llvm-svn: 275279
* [clang-include-fixer] fix PEP8 warningsBenjamin Kramer2016-07-041-9/+11
| | | | | | | | | | This fixes PEP8 E231, E225, E226, E302 warnings. Patch by Kirill Bobyrev! Differential revision: http://reviews.llvm.org/D21974 llvm-svn: 274511
* [include-fixer] give users an option to show N more headers in case there ↵Eric Liu2016-06-101-4/+15
| | | | | | | | | | | | | | are too many candidates. Summary: give users an option to show N more headers in case there are too many candidates. Reviewers: bkramer Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D21181 llvm-svn: 272387
* [include-fixer] try to make vim header selection more friendly.Eric Liu2016-06-071-20/+35
| | | | | | | | | | | | Summary: use 'input()' to get user's input so that we can support more options. Reviewers: hokein, bkramer Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D21019 llvm-svn: 272004
* [include-fixer] Use YAML format in -output-headers and -insert-header mode.Haojian Wu2016-06-011-11/+24
| | | | | | | | | | | | | | | Summary: And some improvements: * Show better error messages on unfound symbols. * Fix a typo. Reviewers: bkramer Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D20827 llvm-svn: 271382
* Make the vim integration output a bit prettier and drop the -debug flag.Benjamin Kramer2016-05-311-4/+4
| | | | llvm-svn: 271266
* [include-fixer] Create a mode in vim integration to show multiple potential ↵Haojian Wu2016-05-311-16/+60
| | | | | | | | | | | | | | | | | | | headers. Summary: Some changes in the patch: * Add two commandline flags in clang-include-fixer. * Introduce a IncludeFixerContext for the queried symbol. * Pull out CreateReplacementsForHeader. Reviewers: bkramer Subscribers: klimek, cfe-commits, ioeric Differential Revision: http://reviews.llvm.org/D20621 llvm-svn: 271258
* [include-fixer] Sort headers after inserting new headers.Eric Liu2016-05-191-6/+5
| | | | | | | | | | | | Summary: [include-fixer] Sort headers after inserting new headers. Reviewers: bkramer Subscribers: klimek, djasper, hokein, cfe-commits Differential Revision: http://reviews.llvm.org/D20370 llvm-svn: 270031
* [clang-include-fixer] Added Vim integration for clang-include-fixer.Eric Liu2016-05-181-0/+65
Summary: [clang-include-fixer] Added Vim integration for clang-include-fixer. Reviewers: hokein, bkramer Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D20329 llvm-svn: 269927
OpenPOWER on IntegriCloud