Open Malangcow opened 1 year ago
@Malangcow Thank you for reporting this issue. I've filed an internal bug (1847073) against the IntelliSense engine code base that is shared with Visual Studio.
@michelleangela wondering if there is any update on this
@sean-mcmanus or @Colengms, could you follow-up?
@sean-mcmanus @Colengms any update on this?
@thecoder138 It hasn't been fixed yet. I added a message to the internal issue.
Is there any workaround?
@jay1999ke Not really. You could do something like
#if __INTELLISENSE__
#define __FILE_NAME__ __FILE__
#endif
and add that to a file specified as a forcedInclude.
This issue was reported against Clang. Please note that it affects GCC as well.
Environment
Bug Summary and Steps to Reproduce
Bug Summary:
Intellisense does not aware of predefined macros from Clang. In my case
__FILE_NAME__
macro__FILE_NAME__
macro is one of the builtin macros from Clang Language Extensions - LinkSteps to reproduce:
Make a simple CMake Clang Project
Create
CMakeList.txt
filemain.cpp
From CMake Tools, Select Kit
Clang 14.0.3 arm64-apple-darwin22.5.0
SelectOkay
When CMake Tools asks user want to configure the project.From the Visual studio code. Open project directort and open
main.cpp
. Error squiggle on the__FILE_NAME__
Check PROBLEMS tab.
Expected behavior:
Configuration and Logs
c_cpp_properties.json
C/C++ Log
Other Extensions
No response
Additional context
No response