-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ycm ignore cl style flags even if i add --driver-mode=cl #2491
Comments
zzbot
added a commit
to ycm-core/ycmd
that referenced
this issue
Feb 6, 2018
[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 -->
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Issue Prelude
Please complete these steps and check these boxes (by putting an
x
insidethe brackets) before filing your issue:
Frequently Asked Questions section.
about to report and couldn't find an answer to my problem. (Example Google
search.)
vim --version
.:YcmDebugInfo
.the
:YcmToggleLogs
command.version) I am using.
my issue.
that any help I receive is a selfless, heartfelt gift of their free time. I
know I am not entitled to anything and will be polite and courteous.
actually perform all of these steps.
Thank you for adhering to this process! It ensures your issue is resolved
quickly and that neither your nor our time is needlessly wasted.
Issue Details
[If filing a bug report, please include a list of steps that describe how to
reproduce the bug you are experiencing. Also include test code if relevant.]
hello developers of YCM:
i'm a windows user, and use gvim and ycm for visual studio project, this is my .ycm_extra_conf.py, after i run :YcmDebug, all of the flags(with format like "/Tp" "/nologo") from vs was disappeared, any one knows why, i use the advice from this page to build my flags https://github.com/Sarcasm/irony-mode/wiki/Setting-up-irony-mode-on-Windows-using-MSVC
.ycm_extra_conf.py.txt
The text was updated successfully, but these errors were encountered: