-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
--
is not handled correctly in compile_commands.json
#10529
Comments
Hi @emptyVoid . Configuration warnings likely refer to legitimate issues trying to configure IntelliSense. If they are not accurate, that would seem to be something we should address. Could you provide the outputs, and the configuration that leads to it? |
Hi @Colengms. I believe it's just the lack of support for clang-cl. I'm getting a lot of these: Some details in the discussion #8777. |
Yeah, we support configuring with clang-cl.exe, but it looks like they may be a compilerArg (or "fragments") and/or clang version that we may not be handling correctly which is causing our querying of clang-cl.exe to fail -- can you provide the args and version being used? Setting |
Hi @emptyVoid . It looks like we're failing to query Could you enable |
C/C++: output.txt Compile command: clang version:
|
@emptyVoid The UPDATE: We have a fix to filter out the "--" from our compiler query, but if there's another scenario where that is needed to be handled differently we may have to revisit it. |
--
is not handled correctly in compile_commands.json
@emptyVoid Cool, thanks for finding that info. Our fix should handle that correctly then. |
Great, thanks! |
@sean-mcmanus I'm still getting the warning after updating to 1.14.4. Wasn't the issue fixed in 1.15.0 instead? (at least it's in 1.15.0 milestone) |
@emptyVoid The fix should be in 1.14.4. We filter out the "--" when doing the compiler querying. It's possible there might be another argument causing an issue? Is the repro info the same as originally? |
@Colengms Any idea what could be going wrong still? |
Hi @emptyVoid . I'm no longer able to reproduce an issue with the command line you provided above. Is that still the command line you are reproducing the issue with? Would you be able to isolate the repro into something you can zip up and share with us? We could use that to investigate further and validate a fix. |
@sean-mcmanus @Colengms Here's a simplified repro: dummy.zip C/C++: output.txt Compile command: And the definition of my CMake Kit: cmake-tools-kits.zip |
I'm seeing |
It looks like something is causing us to not detect your compiler as clang-cl or possibly even clang. What version of LLVM/clang-cl.exe are you using? Does running ""C:\Program Files (x86)\LLVM\bin\clang-cl.exe" /clang:-E /clang:-dM nul" have |
As I've mentioned above it's clang 7.0.0:
And your command gives an error:
|
@emptyVoid Unfortunately, "/clang" only works with clang 8 or newer, i.e. our extension is not able to configure clang-cl 7. We could create an issue to tracking that, but it seems unlikely that we would add support for that old compiler though (i.e. from 2018). Are you able to upgrade to clang 8 or newer? |
Sadly no, that's not an option atm, since our huge code base with many third-party libraries is being built with the same clang. |
I've added an issue to track this at #10624 . |
Unfortunately, the issue doesn't appear to be fixable, so we've closed it. However, you should be able to fix the issue by setting your compilerPath in c_cpp_properties.json to a clang-cl 8 or newer compiler. Your code would still be built with clang 7 (and compile_commands.json would still reference that version of clang-cl), but setting that compilerPath will enable us to be query that compiler correctly....assuming there isn't some other issue. |
Setting Would you be willing to implement the original feature request: to provide a setting to silence these warnings? |
Hi @emptyVoid . Could you clarify what configuration warnings you are getting now? I'd prefer to address the causes of configuration warnings rather than provide a way to suppress them, in order to ensure issues get reported and fixed. I set up a repro and got a configuration warning that I tracked down to the fact that |
Hi @Colengms. The same "Unable to resolve configuration" warnings. Here's all the output I get with And all the output with |
Hi @emptyVoid . It looks some of those warnings are arising due to use of a custom configuration provider (CMake Tools). It's providing a custom browse path as well as a custom configuration for |
Feature Request
I'd like a setting which would do either of the following:
Unable to resolve configuration with compilerPath
;Current behavior is really annoying, whenever I build my project a few configuration warnings make "CMake/Build" panel go away.
The text was updated successfully, but these errors were encountered: