macOS Mojave 10.14 Beta (18A336e)
VS Code 1.25.1
C/C++ 0.17.7
Arduino 0.2.18
used board Fubarino Mini with PIC32MX micro controller
That issue is about the nice feature to dim down unused preprocessor blocks
in the code.
In the moment the wrong preprocessor block is marked as inactive.
This happens with micro controller specific definitions.
#if defined(PIC32MX)
#define TYP 2 // this part is marked as inactive, but it is wrong
#else
#define TYP 0 // this part is marked active, but it is also wrong
#endif
see screenshot

I made an issue on cpp-tools (#2304) and the solution is to add the macro in the c_cpp_properties.json file as define
{ "configurations": [ { "name": "Mac", "includePath": [ "/Users/sstaub/Library/Arduino15/packages/chipKIT/tools/**", "/Users/sstaub/Library/Arduino15/packages/chipKIT/hardware/pic32/2.0.5/**" ], "macFrameworkPath": [ "/System/Library/Frameworks", "/Library/Frameworks" ], "defines": [ "__PIC32MX__" ], "intelliSenseMode": "clang-x64", "compilerPath": "/usr/bin/clang", "cStandard": "c11", "cppStandard": "c++17" } ], "version": 4 }
The solution is to add automatic the right processor family (PIC32MX) and type (32MX250F128B) definitions to the c_cpp_properties.json file.