-------- Diagnostics - 7.7.2020, 21:20:11
Version: 0.29.0-insiders
Current Configuration:
{
"name": "Linux",
"includePath": [
"inc"
],
"defines": [
"TEST"
],
"compilerPath": "/usr/bin/gcc",
"cStandard": "c18",
"cppStandard": "c++17",
"compileCommands": "compile_commands.json",
"forcedInclude": [
"test.h"
],
"compilerArgs": [],
"browse": {
"path": [
"inc",
"${workspaceFolder}"
],
"limitSymbolsToIncludedHeaders": true
}
}
Translation Unit Mappings:
[ /home/baruch/temp/main.cpp ]:
/home/baruch/temp/main.cpp
Translation Unit Configurations:
[ /home/baruch/temp/main.cpp ]:
Process ID: 15667
Memory Usage: 61 MB
Compiler Path: /usr/bin/gcc
Includes:
/home/baruch/temp/inc2
/usr/include/c++/7
/usr/include/x86_64-linux-gnu/c++/7
/usr/include/c++/7/backward
/usr/lib/gcc/x86_64-linux-gnu/7/include
/usr/local/include
/usr/lib/gcc/x86_64-linux-gnu/7/include-fixed
/usr/include/x86_64-linux-gnu
/usr/include
Defines:
TEST2
Standard Version: c++17
IntelliSense Mode: gcc-x64
Other Flags:
--g++
--gnu_version=70500
Total Memory Usage: 61 MB
-------- Diagnostics - 7.7.2020, 21:25:44
Version: 0.29.0-insiders
Current Configuration:
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [
"TEST"
],
"compilerPath": "/usr/bin/gcc",
"cStandard": "c18",
"cppStandard": "c++17",
"forcedInclude": [
"test.h"
],
"compilerArgs": [],
"browse": {
"path": [
"${workspaceFolder}/**"
],
"limitSymbolsToIncludedHeaders": true
}
}
Translation Unit Mappings:
[ /home/baruch/temp/main.cpp ]:
/home/baruch/temp/main.cpp
Translation Unit Configurations:
[ /home/baruch/temp/main.cpp ]:
Process ID: 16065
Memory Usage: 60 MB
Compiler Path: /usr/bin/gcc
Includes:
/usr/include/c++/7
/usr/include/x86_64-linux-gnu/c++/7
/usr/include/c++/7/backward
/usr/lib/gcc/x86_64-linux-gnu/7/include
/usr/local/include
/usr/lib/gcc/x86_64-linux-gnu/7/include-fixed
/usr/include/x86_64-linux-gnu
/usr/include
Defines:
TEST
Forced Includes:
/home/baruch/temp/inc/test.h
Standard Version: c++17
IntelliSense Mode: gcc-x64
Other Flags:
--g++
--gnu_version=70500
Total Memory Usage: 60 MB
Type: LanguageService
Describe the bug
I opened a single folder. I configured to use a compile_commnads.json file. One of the parameters in the command in that file is "-include", which is a forced-include, as well as some of "-I" and "-D" parameters. It seems like this extension fills in the Defines and Includes from the parsed command line, but not the forced-include. I tried to add the include to the forcedInclude setting, but when using a compile_commands.json, the other settings get ignored
Steps to reproduce
This is my compile_commands.json:
Logs
As you can see, in the first log I am using the
compile_commands.jsonand I get the defines and include paths only from there (not from the configuration file), but I get neither forced include.In the second log I am not using the compile_commands.json, and then I get the defines, include paths and forced includes from the configuration.