diff options
| author | Kadir Cetinkaya <kadircet@google.com> | 2018-08-08 08:59:29 +0000 |
|---|---|---|
| committer | Kadir Cetinkaya <kadircet@google.com> | 2018-08-08 08:59:29 +0000 |
| commit | 2f84d911317b6c0c312ef34fd1ca20a32614ea15 (patch) | |
| tree | 15180eef09fe85703271e62036cdfe09576190db /clang-tools-extra/clangd/CodeComplete.h | |
| parent | c6a00f545c4175c94257827522d598013e213e34 (diff) | |
| download | bcm5719-llvm-2f84d911317b6c0c312ef34fd1ca20a32614ea15.tar.gz bcm5719-llvm-2f84d911317b6c0c312ef34fd1ca20a32614ea15.zip | |
Added functionality to suggest FixIts for conversion of '->' to '.' and vice versa.
Summary: Added functionality to suggest FixIts for conversion of '->' to '.' and vice versa.
Reviewers: ilya-biryukov
Reviewed By: ilya-biryukov
Subscribers: yvvan, ioeric, jkorous, arphaman, cfe-commits, kadircet
Differential Revision: https://reviews.llvm.org/D50193
llvm-svn: 339224
Diffstat (limited to 'clang-tools-extra/clangd/CodeComplete.h')
| -rw-r--r-- | clang-tools-extra/clangd/CodeComplete.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang-tools-extra/clangd/CodeComplete.h b/clang-tools-extra/clangd/CodeComplete.h index 884149dfb2b..c623be34afd 100644 --- a/clang-tools-extra/clangd/CodeComplete.h +++ b/clang-tools-extra/clangd/CodeComplete.h @@ -77,6 +77,10 @@ struct CodeCompleteOptions { /// FIXME(ioeric): we might want a better way to pass the index around inside /// clangd. const SymbolIndex *Index = nullptr; + + /// Include completions that require small corrections, e.g. change '.' to + /// '->' on member access etc. + bool IncludeFixIts = false; }; // Semi-structured representation of a code-complete suggestion for our C++ API. @@ -115,6 +119,10 @@ struct CodeCompletion { // Present if Header is set and should be inserted to use this item. llvm::Optional<TextEdit> HeaderInsertion; + /// Holds information about small corrections that needs to be done. Like + /// converting '->' to '.' on member access. + std::vector<TextEdit> FixIts; + // Scores are used to rank completion items. struct Scores { // The score that items are ranked by. |

