| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
| |
Raise a signal if the buffer has been modified before replacing it, to
avoid overwriting users' changes.
Patch by Philipp Stephani.
llvm-svn: 285060
|
|
|
|
|
|
|
|
| |
can run in batch mode.
Patch by Philipp Stephani.
llvm-svn: 285059
|
|
|
|
| |
llvm-svn: 284589
|
|
|
|
|
|
|
|
|
|
|
|
| |
clang-include-fixer processes
By default, Emacs prompts the user when killing processes on exit. This is useful for stateful processes such as interactive shells. However, clang-include-fixer processes are stateless; the only effect of killing them is to cancel a clang-include-fixer operation. Therefore prompting the user is just a nuisance.
Patch by Philipp Stephani.
Differential Revision: https://reviews.llvm.org/D25378
llvm-svn: 283863
|
|
|
|
|
|
|
|
| |
Emacs 24 doesn't have format-message, fall back to format in that case.
Patch by Philipp Stephani.
llvm-svn: 283861
|
|
|
|
|
|
| |
Makes it consistent with documentations.
llvm-svn: 283754
|
|
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D25395
Patch by Philipp Stephani.
llvm-svn: 283736
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
template
The core of the change is supposed to be NFC, however it also fixes
what I believe was an undefined behavior when calling:
va_start(ValueArgs, Desc);
with Desc being a StringRef.
Differential Revision: https://reviews.llvm.org/D25342
llvm-svn: 283671
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
You Use warnings; other minor fixes.
Differential revision: https://reviews.llvm.org/D24179
llvm-svn: 280741
|
|
|
|
|
|
| |
only one candidate header.
llvm-svn: 280359
|
|
|
|
|
|
|
|
|
| |
This reverts commit 2aff596257e1c45fa54baae823ecbe61a785174e.
I'm having a bad day apparently. I reverted the wrong CL. This
puts it back.
llvm-svn: 278978
|
|
|
|
|
|
|
|
|
| |
This reverts commit b725a314a9b7f746c37f70909ec3c4dcb6d9f6b5.
The patch that made this test work needed to be reverted, so this
test needs to be reverted as well.
llvm-svn: 278977
|
|
|
|
|
|
| |
Differential revision: https://reviews.llvm.org/D23045
llvm-svn: 278949
|
|
|
|
| |
llvm-svn: 278922
|
|
|
|
| |
llvm-svn: 278111
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: bkramer
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D23199
llvm-svn: 277811
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
information
Summary:
include-fixer will firstly try to use scoped namespace context information to
search identifier. However, in some cases, it's unsafe to do nested class
search, because it might treat the identifier as a nested class of scoped
namespace.
Given the following code, and the symbol database only has two classes: "foo" and
"b::Bar".
namespace foo { Bar t; }
Before getting fixing, include-fixer will never search "Bar" symbol.
Because it firstly tries to search "foo::Bar", there is no "Bar" in foo namespace,
then it finds "foo" in database finally. So it treats "Bar" is a nested class
of "foo".
Reviewers: bkramer
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D23023
llvm-svn: 277442
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: See http://reviews.llvm.org/D21748 for details.
Reviewers: djasper, klimek
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D21749
llvm-svn: 277336
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
Patch by Jens Massberg! Thanks a lot.
Differential Revision: https://reviews.llvm.org/D22805
llvm-svn: 276853
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: In missing complete type cases, we don't know where to add the qualifiers.
Reviewers: bkramer
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D22812
llvm-svn: 276761
|
|
|
|
|
|
| |
Note the == on the last line, this isn't a strict-weak ordering.
llvm-svn: 276400
|
|
|
|
|
|
|
|
|
|
|
|
| |
symbol.
Reviewers: bkramer
Subscribers: ioeric, cfe-commits
Differential Revision: https://reviews.llvm.org/D22567
llvm-svn: 276280
|
|
|
|
|
|
| |
include a newline at the end.
llvm-svn: 276098
|
|
|
|
| |
llvm-svn: 276096
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 275886
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
symbol.
Reviewers: bkramer
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D22367
llvm-svn: 275542
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The judgement that checks whether the fully-qualified name has scoped qualifiers
prefix is incorrect. Should always check whether the first matched postion is the
beginning position.
Reviewers: bkramer
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D22343
llvm-svn: 275386
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
this patch contains changes related to the interface change from
http://reviews.llvm.org/D21601. Only submit this patch after D21601 is
submitted.
Reviewers: djasper, klimek
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D21602
llvm-svn: 275063
|
|
|
|
|
|
|
|
|
|
|
|
| |
operator.
Reviewers: bkramer
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D22127
llvm-svn: 274848
|
|
|
|
| |
llvm-svn: 274845
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
header.
Summary:
This is an initial version of fixing namespace issues by adding missing
namespace qualifiers to an unidentified symbol.
This version only fixes the first discovered unidentified symbol.
In the long run, include-fixer should fix all unidentified symbols
with a same name at one run.
Currently, it works on command-line tool. The vim integration is not
implemented yet.
Reviewers: klimek, bkramer, djasper
Subscribers: bkramer, ioeric, cfe-commits
Differential Revision: http://reviews.llvm.org/D21603
llvm-svn: 274832
|
|
|
|
|
|
|
|
|
|
| |
This fixes PEP8 E231, E225, E226, E302 warnings.
Patch by Kirill Bobyrev!
Differential revision: http://reviews.llvm.org/D21974
llvm-svn: 274511
|
|
|
|
|
|
| |
char * pair.
llvm-svn: 274501
|
|
|
|
| |
llvm-svn: 274495
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
this enables us to map a group of headers to one header name,
e.g. headers from one directory can be mapped to the same header.
Reviewers: bkramer
Subscribers: cfe-commits, hokein
Differential Revision: http://reviews.llvm.org/D21787
llvm-svn: 274494
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: bkramer
Subscribers: ioeric, cfe-commits
Differential Revision: http://reviews.llvm.org/D21371
llvm-svn: 272773
|
|
|
|
| |
llvm-svn: 272657
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
undefined identifier.
Summary:
we should only deduplicate symbols after matching symbols with the
undefined identifier. This patch tries to fix the situation where matching
symbols are deleted when it has the same header as a non-matching symbol, which
can prevent finding the correct header even if there is a matched symbol.
Reviewers: bkramer
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D21290
llvm-svn: 272576
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
we want to exclude friend declaration, but the `DeclContext` of a
friend function declaration is not the class in which it is declared, so we need
to explicitly check if the parent is a `friendDecl`.
Reviewers: bkramer
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D21175
llvm-svn: 272261
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Currently, removing dot dot in header's path doesn't make include-fixer
minimize path correctly in some cases, for example, specify a relative search
path based on the build directory("-I../include/").
Besides, removing dot dot can break symbolic link directories. So don't
removing it for now.
Reviewers: ioeric, bkramer
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D21132
llvm-svn: 272152
|
|
|
|
| |
llvm-svn: 272132
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|