Type: LanguageService
Describe the bug
When I change intellisense default mode, it seems that some settings are mixed up and show different values when setting some values. I happened to fond this when it was showing VLA intellisense errors on a C18 standard when it sohuldn't in clang on windows.
Steps to reproduce
The rest of the settings work fine.
This also happens if you set this values via the UI method. When I reload the project, the feature seems to correct itself, up until I close the settings window or file.
Expected behavior
Have correct relations to the settings.
We'll generally override the intelliSenseMode based on the compilerPath that is found. What compilerPath is being used? You could see via running C/C++: Log Diagnostics.
The compiler path points to clang, version 10.0. This is my setup in c_cpp_properties.json:
"compilerPath": "C:/Program Files/LLVM/bin/clang.exe",
The compiler path showing in the diagnostics is the same in both the Current Configuration and the Translation Unit Configurations.
It does seem that its showing wrong in the translation configurations section only. I may be doing something wrong, maybe the extra inclusions for windows might be a problem, and force it to msvc-64 (is there a way for me to remove those additional includes if I want to?). Or maybe there is something in clang that connects to msvc-64 and I cannot change it on Windows.
I'll attach my C++ Diagnostic log file here and my c_cpp_properties.json file as well.
Thank you.
Yeah, it should be using clang intelliSenseMode instead of msvc intelliSenseMode, along with some extra flags.
Fixed with https://github.com/microsoft/vscode-cpptools/releases/tag/1.1.0-insiders .
Let us know if you're still hitting other issues with clang-cl.exe configuration.
Hello!
Just tested, everything seem to work ok now on a first inspection. Thanks a lot!
EDIT: Hmm I did notice that now it seems that I cannot force my C Standard to a certain value. It keeps defaulting to C11 even if I set the option as"cStandard": "c17", or to any option for that matter,
Not sure if related to this problem. It seems to happen only on cStandardwith clang. cppStandardworks ok for me.
EDIT: Hmm I did notice that now it seems that I cannot force my C Standard to a certain value. It keeps defaulting to C11 even if I set the option as "cStandard": "c17", or to any option for that matter,
I'm also experiencing this with aarch64-linux-gnu-. It looks like the cStandard option is just ignored and whatever is the default used by the compiler, will be taken. One way I found to workaround this was to add -std=gnu89 to the compilerArgs setting...
@nunojsa @edwood-grant It looks like the failure to use the cStandard from the base config in c_cpp_properties.json is due to a bug introduced by the 1.1.0 insiders. We have a fix, and will release another insiders soon.
Awesome, thanks a lot for all the care on this plugin 馃憤
@edwood-grant The new issue is fixed with https://github.com/microsoft/vscode-cpptools/releases/tag/1.1.0-insiders2