-
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
clang option "-fms-extensions" is ignored for intellisense for clang-based compiler after Version 1.3.1 #7886
Comments
Hi @Helmta. If the compiler is detected as clang, the C/C++ extension currently detects whether If your compiler supports C compilation, this would seem to be a bug with the compiler not specifying a define associated with the feature. Could you provide the output of the following 2 commands? (or a diff of the defines it outputs?)
I'm curious if that might provide some evidence of whether that compiler is recognizing the arg or ignoring it. If the first one has
|
Hi,
Ouputs of C are the same OutputEmbarcadero C++ 7.40 for Win64 Copyright (c) 2012-2018 Embarcadero Technologies, Inc. # 1 "<command line>" 1 Output of C++ OutputEmbarcadero C++ 7.40 for Win64 Copyright (c) 2012-2018 Embarcadero Technologies, Inc. # 1 "<command line>" 1 You can see the line So I played a bit with the commenadline args. Especially the
The only way i found to get the Output# 1 "nul" # 1 "<command line>" 1 Then i have to set the target with So I tried to set Settings"C_Cpp.default.compilerPath": "C:/prg/Embarcadero/Studio/20.0/bin/bcc64.exe", ErrorAttempting to get defaults from C++ compiler in "compilerPath" property: 'C:/prg/Embarcadero/Studio/20.0/bin/bcc64.exe' or Settings"C_Cpp.default.compilerPath": "C:/prg/Embarcadero/Studio/20.0/bin/bcc64.exe -cc1 -triple x86_64-pc-win32-elf -fms-extensions", ErrorAttempting to get defaults from C++ compiler in "compilerPath" property: 'C:/prg/Embarcadero/Studio/20.0/bin/bcc64.exe' With Extra Information
stripped commandline with all args the original GUI is invoking |
Hi @Helmta . Does your code include uses of MS extensions that fail to compile when - I'm not familiar with either the That would explain why we are not processing them. Can you refer me to documentation that describes them? We should be able to fix the issue with |
Using clang (9, 10, 11, 12), I haven't been able to get it to accept a
Is that something unique to Embarcadero C++ ? The form appears to be the same as |
Hi @Colengms .
The code compiles without problems. I think that
I have not found any documentation either. The only way is throuh https://stackoverflow.com/questions/8991662/what-does-the-clang-cc1-option-do Thanks for ur great help. |
Hi @Helmta . I'd like to confirm that the compiler is actually supporting
|
Hi @Colengms . Test.cpp:
If I use the
I tested more code with the original GUI and it is allways invoking the compiler with the |
This should be addressed in 1.6.0-insiders. Note that was addressed by honoring the arg if present on the command line, not by hard-coding awareness of |
Bug type: Language Service
VS-Code Version: 1.58.2 (system setup)
OS: Windows_NT x64 10.0.18363
Hi,
we are using Embarcadero C++ Builder 10.3 as our C++ compiler. It's a clang-based compiler.
We are using cmake+ninja for compilation and it works but we can not use cmake as configuration-provider.
relevant setting:
"C_Cpp.default.intelliSenseMode": "windows-clang-x64",
"C_Cpp.default.cppStandard": "c++17",
"C_Cpp.default.cStandard": "c11",
"C_Cpp.default.systemIncludePath": [
"C:/prg/Embarcadero/Studio/20.0/include/dinkumware64/",
"C:/prg/Embarcadero/Studio/20.0/include/boost_1_68/",
"C:/prg/Embarcadero/Studio/20.0/include/windows/"
],
"C_Cpp.default.configurationProvider": "${default}", //suppress cmake asking for intellisense-provider on every startup
"C_Cpp.default.compilerPath": "C:/prg/Embarcadero/Studio/20.0/bin/bcc64.exe",
"C_Cpp.default.compilerArgs": [
"-fms-extensions"
],
"C_Cpp.intelliSenseEngine": "Default",
With C/C++ Version 1.3.1
C/C++ Logs in Debug-Mode:
Attempting to get defaults from C compiler in "compilerPath" property: 'C:/prg/Embarcadero/Studio/20.0/bin/bcc64.exe'
Querying compiler for default C++ language standard using command line: "C:/prg/Embarcadero/Studio/20.0/bin/bcc64.exe" -x c++ -E -dM nul
Custom configuration provider 'CMake Tools' registered
Detected language standard version: c++17
Querying compiler for default C language standard using command line: "C:/prg/Embarcadero/Studio/20.0/bin/bcc64.exe" -x c -E -dM nul
Detected language standard version: c11
Querying compiler's default target using command line: "C:/prg/Embarcadero/Studio/20.0/bin/bcc64.exe" -dumpmachine
Compiler returned default target value: Embarcadero C++ 7.40 for Win64 Copyright (c) 2012-2018 Embarcadero Technologies, Inc.
x86_64-pc-windows-elf
Compiler query command line: "C:/prg/Embarcadero/Studio/20.0/bin/bcc64.exe" -fms-extensions -std=c11 -Wp,-v -E -dD -x c -m64 -fno-blocks nul
Code browsing service initialized
Attempting to get defaults from C++ compiler in "compilerPath" property: 'C:/prg/Embarcadero/Studio/20.0/bin/bcc64.exe'
Compiler query command line: "C:/prg/Embarcadero/Studio/20.0/bin/bcc64.exe" -fms-extensions -std=c++17 -Wp,-v -E -dD -x c++ -m64 -fno-blocks nul
...
other: --ms_extensions
other: --clang
other: --clang_version=50002
stdver: c++17
intelliSenseMode: windows-clang-x64
...
Logs after trying to switch to "windows-gcc-x64":
[28.7.2021, 09:39:01] For C source files, IntelliSenseMode was changed from "windows-gcc-x64" to "windows-clang-x64" based on compiler args and querying compilerPath: "C:/prg/Embarcadero/Studio/20.0/bin/bcc64.exe"
[28.7.2021, 09:39:03] For C++ source files, IntelliSenseMode was changed from "windows-gcc-x64" to "windows-clang-x64" based on compiler args and querying compilerPath: "C:/prg/Embarcadero/Studio/20.0/bin/bcc64.exe"
With C/C++ Version 1.5.1 (every Version after 1.3.1)
Attempting to get defaults from C compiler in "compilerPath" property: 'C:/prg/Embarcadero/Studio/20.0/bin/bcc64.exe'
Querying compiler for default C++ language standard using command line: "C:/prg/Embarcadero/Studio/20.0/bin/bcc64.exe" -x c++ -E -dM nul
Detected language standard version: c++17
Querying compiler for default C language standard using command line: "C:/prg/Embarcadero/Studio/20.0/bin/bcc64.exe" -x c -E -dM nul
Detected language standard version: c11
Querying compiler's default target using command line: "C:/prg/Embarcadero/Studio/20.0/bin/bcc64.exe" -dumpmachine
Compiler returned default target value: Embarcadero C++ 7.40 for Win64 Copyright (c) 2012-2018 Embarcadero Technologies, Inc.
x86_64-pc-windows-elf
Compiler query command line: "C:/prg/Embarcadero/Studio/20.0/bin/bcc64.exe" -fms-extensions -std=c11 -Wp,-v -E -dD -x c -m64 -fno-blocks nul
Code browsing service initialized
Attempting to get defaults from C++ compiler in "compilerPath" property: 'C:/prg/Embarcadero/Studio/20.0/bin/bcc64.exe'
Compiler query command line: "C:/prg/Embarcadero/Studio/20.0/bin/bcc64.exe" -fms-extensions -std=c++17 -Wp,-v -E -dD -x c++ -m64 -fno-blocks nul
Custom configuration provider 'CMake Tools' registered
...
--->at this point "other: --ms_extensions" is missing <---
other: --clang
other: --clang_version=50002
stdver: c++17
intelliSenseMode: windows-clang-x64
...
The text was updated successfully, but these errors were encountered: