-
Notifications
You must be signed in to change notification settings - Fork 771
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
only skip flag that is actually a file #602
Conversation
Hi, I'm trying to make YouCompleteMe works with MSVC style arguments better, these arguments starts with '/' but currently YouCompleteMe thinks these're file flag and throws them, this patch add a addition check to make sure arguments to throw is actually a file argument ,not MSVC style argument |
Thanks for sending a PR! We will need tests updated for this. I don't think we have ever tested MSVC style flags and tbh I didn't realise clang accepted them. So I think this is a larger job :/ Review status: 0 of 1 files reviewed at latest revision, all discussions resolved, some commit checks failed. Comments from Reviewable |
I'm not sure I understood the problem, but this for sure needs a test to be written. |
Libclang only accepts MSVC style flags when the driver mode is set to Review status: 0 of 1 files reviewed at latest revision, all discussions resolved, some commit checks failed. Comments from Reviewable |
Agreed with @micbou. Accepting CL-style flags is not a common case for clang. The drawback of looking for Either way, extensive tests are necessary. Review status: 0 of 1 files reviewed at latest revision, all discussions resolved, some commit checks failed. Comments from Reviewable |
I've created a modified msbuild to generate compile_commands.json for existing MSVC project and adds --driver-mode=cl to every compile commands, makes this work . |
Review status: 0 of 1 files reviewed at latest revision, 1 unresolved discussion, some commit checks failed. ycmd/completers/cpp/flags.py, line 312 at r1 (raw file):
This is wrong. We are supposed to ignore any file, not just the one currently edited. Comments from Reviewable |
is_file does not mean the one currently edited, but every flag in flags iterates. |
In Reviewed 1 of 1 files at r1. Comments from Reviewable |
Yes you're right, I misuse this. what I want to achiveve is make sure it to be true for any file. so should I correct this , or waiting YCM implements |
this improves compatibility with msvc-cl style compile flags
c269a21
to
78825c1
Compare
Current coverage is 83.75% (diff: 0.00%)@@ master #602 diff @@
==========================================
Files 41 41
Lines 3835 3836 +1
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
- Hits 3583 3213 -370
- Misses 252 623 +371
Partials 0 0
|
Closed in favor of #789. |
this improves compatibility with msvc-cl style compile flags
This change is