-
Notifications
You must be signed in to change notification settings - Fork 769
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #789 - bstaletic:windows_style_flags, r=micbou
[READY] Enable windows style flags when --driver-mode=cl is found in flags Windows (cl) style flags are currently filtered and thus windows users are unable to use a `.ycm_extra_conf.py` such as this one: ```py def FlagsForFile( filename ): return { 'flags': [ '--driver-mode=cl', '/c', '/Zi', '/nologo', '/W3', '/WX-', '/O2', '/GL', '/Gm-', '/EHsc', '/MT', '/GS', '/fp:precise', '/Zc:wchar_t', '/Zc:forScope', '/Zc:inline', '/Gd', '/TP', '/wd4099', '/Tp' ] } ``` If `--driver-mode=cl` is in flags, libclang gladly accepts these flags. This pull request checks for `--driver-mode=cl` before filtering the flags. U used the above `.ycm_extra_conf.py` to confirm if everything works. The resulting `:YcmDebugInfo`: ``` Printing YouCompleteMe debug information... -- Client logfile: /tmp/ycm_rbjk7yrj.log -- Server Python interpreter: /usr/sbin/python -- Server Python version: 3.6.1 -- Server has Clang support compiled in: True -- Clang version: clang version 4.0.1 (tags/RELEASE_401/final) -- Extra configuration file found and loaded -- Extra configuration path: /home/bstaletic/Temp/ycmd/test/.ycm_extra_conf.py -- C-family completer debug information: -- Compilation database path: None -- Flags: ['--driver-mode=cl', '-resource-dir=/home/bstaletic/.vim/pack/minpac/start/YouCompleteMe/third_party/ycmd/ycmd/../clang_includes', '/c', '/Zi', '/nologo', '/W3', '/WX-', '/O2', '/GL', '/Gm-', '/EHsc', '/MT', '/GS', '/fp:precise', '/Zc:wchar_t', '/Zc:forScope', '/Zc:inline', '/Gd', '/TP', '/wd4099', '/Tp', '-fspell-checking'] -- Server running at: http://127.0.0.1:51101 -- Server process ID: 16027 -- Server logfiles: -- /tmp/ycmd_51101_stdout_rh2xfnry.log -- /tmp/ycmd_51101_stderr_7_n_feiy.log ``` Fixes ycm-core/YouCompleteMe#2491 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/ycmd/789) <!-- Reviewable:end -->
- Loading branch information
Showing
6 changed files
with
236 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.