Auto merge of #3034 - midchildan:add-cuda, r=micbou
Add CUDA support # PR Prelude Thank you for working on YCM! :) **Please complete these steps and check these boxes (by putting an `x` inside the brackets) _before_ filing your PR:** - [x] I have read and understood YCM's [CONTRIBUTING][cont] document. - [x] I have read and understood YCM's [CODE_OF_CONDUCT][code] document. - [ ] I have included tests for the changes in my PR. If not, I have included a rationale for why I haven't. - [x] **I understand my PR may be closed if it becomes obvious I didn't actually perform all of these steps.** # Why this change is necessary and useful This PR follows Valloric/ycmd#1031. The specific changes are listed below: - enable linting for cuda files - disable syntastic for cuda files - update docs I have not included tests because there are no tests for the C++ counterparts. [Please explain **in detail** why the changes in this PR are needed.] [cont]: https://github.com/Valloric/YouCompleteMe/blob/master/CONTRIBUTING.md [code]: https://github.com/Valloric/YouCompleteMe/blob/master/CODE_OF_CONDUCT.md <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/3034) <!-- Reviewable:end -->
This commit is contained in:
commit
e5b28f5c32
40
README.md
40
README.md
@ -1051,7 +1051,8 @@ to Clang.
|
||||
|
||||
**NOTE**: It is highly recommended to include `-x <language>` flag to libclang.
|
||||
This is so that the correct language is detected, particularly for header files.
|
||||
Common values are `-x c` for C, `-x c++` for C++ and `-x objc` for Objective-C.
|
||||
Common values are `-x c` for C, `-x c++` for C++, `-x objc` for Objective-C, and
|
||||
`-x cuda` for CUDA.
|
||||
|
||||
To give you an impression, if your c++ project is trivial, and your usual
|
||||
compilation command is: `g++ -Wall -Wextra -Werror -o FILE.o FILE.cc`, then the
|
||||
@ -1627,13 +1628,13 @@ autocommand](#the-ycmquickfixopened-autocommand).
|
||||
|
||||
Looks up the current line for a header and jumps to it.
|
||||
|
||||
Supported in filetypes: `c, cpp, objc, objcpp`
|
||||
Supported in filetypes: `c, cpp, objc, objcpp, cuda`
|
||||
|
||||
#### The `GoToDeclaration` subcommand
|
||||
|
||||
Looks up the symbol under the cursor and jumps to its declaration.
|
||||
|
||||
Supported in filetypes: `c, cpp, objc, objcpp, cs, go, java, python, rust,
|
||||
Supported in filetypes: `c, cpp, objc, objcpp, cuda, cs, go, java, python, rust,
|
||||
typescript`
|
||||
|
||||
#### The `GoToDefinition` subcommand
|
||||
@ -1645,8 +1646,8 @@ namely when the definition of the symbol is in the current translation unit. A
|
||||
translation unit consists of the file you are editing and all the files you are
|
||||
including with `#include` directives (directly or indirectly) in that file.
|
||||
|
||||
Supported in filetypes: `c, cpp, objc, objcpp, cs, go, java, javascript, python,
|
||||
rust, typescript`
|
||||
Supported in filetypes: `c, cpp, objc, objcpp, cuda, cs, go, java, javascript,
|
||||
python, rust, typescript`
|
||||
|
||||
#### The `GoTo` subcommand
|
||||
|
||||
@ -1657,8 +1658,8 @@ the current translation unit, jumps to the symbol's declaration. For
|
||||
C/C++/Objective-C, it first tries to look up the current line for a header and
|
||||
jump to it. For C#, implementations are also considered and preferred.
|
||||
|
||||
Supported in filetypes: `c, cpp, objc, objcpp, cs, go, java, javascript, python,
|
||||
rust, typescript`
|
||||
Supported in filetypes: `c, cpp, objc, objcpp, cuda, cs, go, java, javascript,
|
||||
python, rust, typescript`
|
||||
|
||||
#### The `GoToImprecise` subcommand
|
||||
|
||||
@ -1671,7 +1672,7 @@ changes since the last parse that would lead to incorrect jumps. When you're
|
||||
just browsing around your codebase, this command can spare you quite a bit of
|
||||
latency.
|
||||
|
||||
Supported in filetypes: `c, cpp, objc, objcpp`
|
||||
Supported in filetypes: `c, cpp, objc, objcpp, cuda`
|
||||
|
||||
#### The `GoToReferences` subcommand
|
||||
|
||||
@ -1724,7 +1725,8 @@ Invoking this command on `s` returns `std::string => std::basic_string<char>`
|
||||
|
||||
**NOTE:** Causes re-parsing of the current translation unit.
|
||||
|
||||
Supported in filetypes: `c, cpp, objc, objcpp, java, javascript, typescript`
|
||||
Supported in filetypes: `c, cpp, objc, objcpp, cuda, java, javascript,
|
||||
typescript`
|
||||
|
||||
#### The `GetTypeImprecise` subcommand
|
||||
|
||||
@ -1737,7 +1739,7 @@ changes since the last parse that would lead to incorrect type. When you're
|
||||
just browsing around your codebase, this command can spare you quite a bit of
|
||||
latency.
|
||||
|
||||
Supported in filetypes: `c, cpp, objc, objcpp`
|
||||
Supported in filetypes: `c, cpp, objc, objcpp, cuda`
|
||||
|
||||
#### The `GetParent` subcommand
|
||||
|
||||
@ -1768,7 +1770,7 @@ For global declarations, the semantic parent is the translation unit.
|
||||
|
||||
**NOTE:** Causes re-parsing of the current translation unit.
|
||||
|
||||
Supported in filetypes: `c, cpp, objc, objcpp`
|
||||
Supported in filetypes: `c, cpp, objc, objcpp, cuda`
|
||||
|
||||
#### The `GetDoc` subcommand
|
||||
|
||||
@ -1780,8 +1782,8 @@ under the cursor. Depending on the file type, this includes things like:
|
||||
* Python docstrings,
|
||||
* etc.
|
||||
|
||||
Supported in filetypes: `c, cpp, objc, objcpp, cs, java, javascript, python,
|
||||
typescript, rust`
|
||||
Supported in filetypes: `c, cpp, objc, objcpp, cuda, cs, java, javascript,
|
||||
python, typescript, rust`
|
||||
|
||||
#### The `GetDocImprecise` subcommand
|
||||
|
||||
@ -1794,7 +1796,7 @@ changes since the last parse that would lead to incorrect docs. When you're
|
||||
just browsing around your codebase, this command can spare you quite a bit of
|
||||
latency.
|
||||
|
||||
Supported in filetypes: `c, cpp, objc, objcpp`
|
||||
Supported in filetypes: `c, cpp, objc, objcpp, cuda`
|
||||
|
||||
### Refactoring Commands
|
||||
|
||||
@ -1829,7 +1831,7 @@ indication).
|
||||
|
||||
**NOTE:** Causes re-parsing of the current translation unit.
|
||||
|
||||
Supported in filetypes: `c, cpp, objc, objcpp, cs, java, typescript`
|
||||
Supported in filetypes: `c, cpp, objc, objcpp, cuda, cs, java, typescript`
|
||||
|
||||
#### The `RefactorRename <new name>` subcommand
|
||||
|
||||
@ -1928,7 +1930,7 @@ the server with the `:YcmRestartServer` command).
|
||||
This command clears that cache entirely. YCM will then re-query your
|
||||
`FlagsForFile` function or your compilation database as needed in the future.
|
||||
|
||||
Supported in filetypes: `c, cpp, objc, objcpp`
|
||||
Supported in filetypes: `c, cpp, objc, objcpp, cuda`
|
||||
|
||||
#### The `ReloadSolution` subcommand
|
||||
|
||||
@ -2206,8 +2208,8 @@ or off. See the other options below for details.
|
||||
Note that YCM's diagnostics UI is only supported for C-family languages.
|
||||
|
||||
When set, this option also makes YCM remove all Syntastic checkers set for the
|
||||
`c`, `cpp`, `objc` and `objcpp` filetypes since this would conflict with YCM's
|
||||
own diagnostics UI.
|
||||
`c`, `cpp`, `objc`, `objcpp`, and `cuda` filetypes since this would conflict
|
||||
with YCM's own diagnostics UI.
|
||||
|
||||
If you're using YCM's identifier completer in C-family languages but cannot use
|
||||
the clang-based semantic completer for those languages _and_ want to use the GCC
|
||||
@ -2830,7 +2832,7 @@ let g:ycm_semantic_triggers = {
|
||||
\ 'objc' : ['->', '.', 're!\[[_a-zA-Z]+\w*\s', 're!^\s*[^\W\d]\w*\s',
|
||||
\ 're!\[.*\]\s'],
|
||||
\ 'ocaml' : ['.', '#'],
|
||||
\ 'cpp,objcpp' : ['->', '.', '::'],
|
||||
\ 'cpp,cuda,objcpp' : ['->', '.', '::'],
|
||||
\ 'perl' : ['->'],
|
||||
\ 'php' : ['->', '::'],
|
||||
\ 'cs,java,javascript,typescript,d,python,perl6,scala,vb,elixir,go' : ['.'],
|
||||
|
@ -369,6 +369,7 @@ function! s:TurnOffSyntasticForCFamily()
|
||||
let g:syntastic_c_checkers = []
|
||||
let g:syntastic_objc_checkers = []
|
||||
let g:syntastic_objcpp_checkers = []
|
||||
let g:syntastic_cuda_checkers = []
|
||||
endfunction
|
||||
|
||||
|
||||
|
@ -1291,8 +1291,8 @@ to Clang.
|
||||
|
||||
**NOTE**: It is highly recommended to include '-x <language>' flag to libclang.
|
||||
This is so that the correct language is detected, particularly for header
|
||||
files. Common values are '-x c' for C, '-x c++' for C++ and '-x objc' for
|
||||
Objective-C.
|
||||
files. Common values are '-x c' for C, '-x c++' for C++, '-x objc' for
|
||||
Objective-C, and '-x cuda' for CUDA.
|
||||
|
||||
To give you an impression, if your c++ project is trivial, and your usual
|
||||
compilation command is: 'g++ -Wall -Wextra -Werror -o FILE.o FILE.cc', then the
|
||||
@ -1893,14 +1893,14 @@ The *GoToInclude* subcommand
|
||||
|
||||
Looks up the current line for a header and jumps to it.
|
||||
|
||||
Supported in filetypes: 'c, cpp, objc, objcpp'
|
||||
Supported in filetypes: 'c, cpp, objc, objcpp, cuda'
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
The *GoToDeclaration* subcommand
|
||||
|
||||
Looks up the symbol under the cursor and jumps to its declaration.
|
||||
|
||||
Supported in filetypes: 'c, cpp, objc, objcpp, cs, go, java, python, rust,
|
||||
Supported in filetypes: 'c, cpp, objc, objcpp, cuda, cs, go, java, python, rust,
|
||||
typescript'
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
@ -1913,7 +1913,7 @@ namely when the definition of the symbol is in the current translation unit. A
|
||||
translation unit consists of the file you are editing and all the files you are
|
||||
including with '#include' directives (directly or indirectly) in that file.
|
||||
|
||||
Supported in filetypes: 'c, cpp, objc, objcpp, cs, go, java, javascript,
|
||||
Supported in filetypes: 'c, cpp, objc, objcpp, cuda, cs, go, java, javascript,
|
||||
python, rust, typescript'
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
@ -1926,7 +1926,7 @@ the current translation unit, jumps to the symbol's declaration. For
|
||||
C/C++/Objective-C, it first tries to look up the current line for a header and
|
||||
jump to it. For C#, implementations are also considered and preferred.
|
||||
|
||||
Supported in filetypes: 'c, cpp, objc, objcpp, cs, go, java, javascript,
|
||||
Supported in filetypes: 'c, cpp, objc, objcpp, cuda, cs, go, java, javascript,
|
||||
python, rust, typescript'
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
@ -1941,7 +1941,7 @@ made any changes since the last parse that would lead to incorrect jumps. When
|
||||
you're just browsing around your codebase, this command can spare you quite a
|
||||
bit of latency.
|
||||
|
||||
Supported in filetypes: 'c, cpp, objc, objcpp'
|
||||
Supported in filetypes: 'c, cpp, objc, objcpp, cuda'
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
The *GoToReferences* subcommand
|
||||
@ -1999,7 +1999,8 @@ Invoking this command on 's' returns 'std::string => std::basic_string<char>'
|
||||
|
||||
**NOTE:** Causes re-parsing of the current translation unit.
|
||||
|
||||
Supported in filetypes: 'c, cpp, objc, objcpp, java, javascript, typescript'
|
||||
Supported in filetypes: 'c, cpp, objc, objcpp, cuda, java, javascript,
|
||||
typescript'
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
The *GetTypeImprecise* subcommand
|
||||
@ -2013,7 +2014,7 @@ made any changes since the last parse that would lead to incorrect type. When
|
||||
you're just browsing around your codebase, this command can spare you quite a
|
||||
bit of latency.
|
||||
|
||||
Supported in filetypes: 'c, cpp, objc, objcpp'
|
||||
Supported in filetypes: 'c, cpp, objc, objcpp, cuda'
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
The *GetParent* subcommand
|
||||
@ -2043,7 +2044,7 @@ For global declarations, the semantic parent is the translation unit.
|
||||
|
||||
**NOTE:** Causes re-parsing of the current translation unit.
|
||||
|
||||
Supported in filetypes: 'c, cpp, objc, objcpp'
|
||||
Supported in filetypes: 'c, cpp, objc, objcpp, cuda'
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
The *GetDoc* subcommand
|
||||
@ -2056,8 +2057,8 @@ under the cursor. Depending on the file type, this includes things like:
|
||||
- Python docstrings,
|
||||
- etc.
|
||||
|
||||
Supported in filetypes: 'c, cpp, objc, objcpp, cs, java, javascript, python,
|
||||
typescript, rust'
|
||||
Supported in filetypes: 'c, cpp, objc, objcpp, cuda, cs, java, javascript,
|
||||
python, typescript, rust'
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
The *GetDocImprecise* subcommand
|
||||
@ -2071,7 +2072,7 @@ made any changes since the last parse that would lead to incorrect docs. When
|
||||
you're just browsing around your codebase, this command can spare you quite a
|
||||
bit of latency.
|
||||
|
||||
Supported in filetypes: 'c, cpp, objc, objcpp'
|
||||
Supported in filetypes: 'c, cpp, objc, objcpp, cuda'
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
*youcompleteme-refactoring-commands*
|
||||
@ -2109,7 +2110,7 @@ indication).
|
||||
|
||||
**NOTE:** Causes re-parsing of the current translation unit.
|
||||
|
||||
Supported in filetypes: 'c, cpp, objc, objcpp, cs, java, typescript'
|
||||
Supported in filetypes: 'c, cpp, objc, objcpp, cuda, cs, java, typescript'
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
*RefactorRename-new-name*
|
||||
@ -2216,7 +2217,7 @@ the server with the |:YcmRestartServer| command).
|
||||
This command clears that cache entirely. YCM will then re-query your
|
||||
'FlagsForFile' function or your compilation database as needed in the future.
|
||||
|
||||
Supported in filetypes: 'c, cpp, objc, objcpp'
|
||||
Supported in filetypes: 'c, cpp, objc, objcpp, cuda'
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
The *ReloadSolution* subcommand
|
||||
@ -2488,8 +2489,8 @@ on or off. See the other options below for details.
|
||||
Note that YCM's diagnostics UI is only supported for C-family languages.
|
||||
|
||||
When set, this option also makes YCM remove all Syntastic checkers set for the
|
||||
'c', 'cpp', 'objc' and 'objcpp' filetypes since this would conflict with YCM's
|
||||
own diagnostics UI.
|
||||
'c', 'cpp', 'objc', 'objcpp', and 'cuda' filetypes since this would conflict
|
||||
with YCM's own diagnostics UI.
|
||||
|
||||
If you're using YCM's identifier completer in C-family languages but cannot use
|
||||
the clang-based semantic completer for those languages _and_ want to use the
|
||||
@ -3070,7 +3071,7 @@ Default: '[see next line]'
|
||||
\ 'objc' : ['->', '.', 're!\[[_a-zA-Z]+\w*\s', 're!^\s*[^\W\d]\w*\s',
|
||||
\ 're!\[.*\]\s'],
|
||||
\ 'ocaml' : ['.', '#'],
|
||||
\ 'cpp,objcpp' : ['->', '.', '::'],
|
||||
\ 'cpp,cuda,objcpp' : ['->', '.', '::'],
|
||||
\ 'perl' : ['->'],
|
||||
\ 'php' : ['->', '::'],
|
||||
\ 'cs,java,javascript,typescript,d,python,perl6,scala,vb,elixir,go' : ['.'],
|
||||
|
@ -27,7 +27,8 @@ from ycm.client.event_notification import EventNotification
|
||||
from ycm.diagnostic_interface import DiagnosticInterface
|
||||
|
||||
|
||||
DIAGNOSTIC_UI_FILETYPES = { 'cpp', 'cs', 'c', 'objc', 'objcpp', 'typescript' }
|
||||
DIAGNOSTIC_UI_FILETYPES = { 'cpp', 'cs', 'c', 'objc', 'objcpp', 'cuda',
|
||||
'typescript' }
|
||||
DIAGNOSTIC_UI_ASYNC_FILETYPES = { 'java' }
|
||||
|
||||
|
||||
|
2
third_party/ycmd
vendored
2
third_party/ycmd
vendored
@ -1 +1 @@
|
||||
Subproject commit fffda54e8ff0dcbb47746702183a689a511fef99
|
||||
Subproject commit 8082b6f241bd911452cfd7f21f8a70fce00abf63
|
Loading…
Reference in New Issue
Block a user