Description
Environment
- OS and Version: Ubuntu 22.04.5 LTS
- VS Code Version: 1.99.3
- C/C++ Extension Version: 1.25.3
- If using SSH remote, specify OS of remote machine: No remote
Bug Summary and Steps to Reproduce
Bug Summary:
For the following Test_Workspace:
Test_Workspace/
- build/qnx710
- compile_commands.json
- ...
- inc/
- myInclude.h
- cmake/
- toolchains/
- qnx710-arm-toolchain-conan.cmake
- toolchains/
- main.c
- CMakeLists.txt
- conanfile.py
After executing the build, CMake generates compile_commands.json file inside build/qnx710 folder. When adding compile_commands.json path to the c_cpp_properties.json configuration of the workspace, the system includes in with the format "-Wp,-isystem,/home//Test_Workspace/inc" are ignored/not parsed correctly by cpptools. Navigating to the header files in the system include folder is not working, error squiggles and the message:
#include errors detected. Consider updating your compile_commands.json or includePath. Squiggles are disabled for this translation unit (/home/Test_Workspace/main.c).C/C++(1696)
Steps to reproduce:
- Create a compile_commands.json which includes -Wp,-isystem,/home//Test_Workspace/inc
- Add path to this compile_commands.json to the c_cpp_properties.json
- Try CTRL+LeftMouseclick on an system include
- See error
Expected behavior:
cpptools parsed sytem include path correctly and navigating to the header files in the system include path works without errors. No error squiggles should be shown.
Configuration and Logs
{
"configurations": [
{
"name": "neutrino_armv8_qcc83_debug",
"compilerPath": "~/.conan/data/<path-to-toolchain-package>/host/linux/x86_64/usr/bin/qcc",
"cStandard": "c11",
"cppStandard": "c++14",
"compileCommands": [
"build/qnx710/compile_commands.json"
],
"includePath": [
"${workspaceFolder}/**"
]
}
],
"version": 4
}
-------- Diagnostics - 4/29/2025, 11:29:15 AM
Version: 1.25.3
Current Configuration:
{
"name": "neutrino_armv8_qcc83_bbnxp_debug",
"compilerPath": "/home/<username>/.conan/<path-to-toolchain-package>/host/linux/x86_64/usr/bin/qcc",
"cStandard": "c11",
"cppStandard": "c++14",
"compileCommands": [
"/home/<username>/Test_Workspace/build/qnx710/compile_commands.json"
],
"includePath": [
"/home/<username>/Test_Workspace/**"
],
"compilerPathIsExplicit": true,
"cStandardIsExplicit": true,
"cppStandardIsExplicit": true,
"intelliSenseModeIsExplicit": false,
"recursiveIncludesReduceIsExplicit": true,
"recursiveIncludesPriorityIsExplicit": true,
"recursiveIncludesOrderIsExplicit": true,
"compilerPathInCppPropertiesJson": "~/.conan/<path-to-toolchain-package>/host/linux/x86_64/usr/bin/qcc",
"compileCommandsInCppPropertiesJson": [
"build/qnx710/compile_commands.json"
],
"mergeConfigurations": false,
"recursiveIncludes": {
"reduce": "default",
"priority": "afterSystemIncludes",
"order": "depthFirst"
},
"browse": {
"limitSymbolsToIncludedHeaders": true
}
}
Additional Tracked Settings:
{
"editorTabSize": 4,
"editorInsertSpaces": true,
"editorAutoClosingBrackets": "languageDefined",
"filesEncoding": "utf8",
"filesAssociations": {
"stdio.h": "c"
},
"filesExclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/.DS_Store": true,
"**/Thumbs.db": true
},
"filesAutoSaveAfterDelay": false,
"editorInlayHintsEnabled": true,
"editorParameterHintsEnabled": true,
"searchExclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/*.code-search": true
},
"workbenchSettingsEditor": "ui"
}
cpptools version (native): 1.25.3.0
Current database path: /home/<username>/.cache/vscode-cpptools/15cea5a343f9a039922a513837cff81f/.browse.VC.db
Translation Unit Mappings:
[ /home/<username>/Test_Workspace/main.c - source TU]:
Translation Unit Configurations:
[ /home/<username>/Test_Workspace/main.c ]
Process ID: 17277
Memory Usage: 20 MB
Compiler Path: /home/<username>/.conan/<path-to-toolchain-package>/host/linux/x86_64/usr/bin/qcc
Include paths:
include: /home/<username>/Test_Workspace/build/qnx710/{USER_DEFINED}-L{USER_DEFINED}
system include: /home/<username>/.conan/<additional-system-includes>/target/qnx7/usr/include
system include: /home/<username>/.conan/<additional-system-includes>/host/linux/x86_64/usr/lib/gcc/aarch64-unknown-nto-qnx7.1.0/8.3.0/include
Defines:
_FORTIFY_SOURCE=2
_QNX_SOURCE
_DEBUG
Standard Version: c11
IntelliSense Mode: linux-gcc-arm64
Other Flags:
--gcc
--gnu_version=80300
compile_commands.json entry:
directory: /home/<username>/Test_Workspace/build/qnx710
file: /home/<username>/Test_Workspace/main.c
command: /home/<username>/.conan/<path-to-toolchain-package>host/linux/x86_64/usr/bin/qcc -Wp,-isystem,/home/<username>/Test_Workspace/inc -V,gcc_ntoaarch64le -fno-common -fno-builtin -fno-aggressive-loop-optimizations -fPIC -fPIE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -std=c11 -D_QNX_SOURCE -I{USER_DEFINED}-L{USER_DEFINED} -ffunction-sections -fdata-sections -g -O2 -D_DEBUG -o CMakeFiles/hello-world.dir/main.c.o -c /home/<username>/Test_Workspace/main.c
Total Memory Usage: 20 MB
Browse Paths from compile_commands.json, from workspace folder: /home/<username>/Test_Workspace
/home/<username>/.conan/<additional-system-includes>/host/linux/x86_64/usr/lib/gcc/aarch64-unknown-nto-qnx7.1.0/8.3.0/include
/home/<username>/.conan/<additional-system-includes>/host/linux/x86_64/usr/lib/gcc/x86_64-pc-nto-qnx7.1.0/8.3.0/include
/home/<username>/.conan/<additional-system-includes>/target/qnx7/usr/include
/home/<username>/.conan/<additional-system-includes>/target/qnx7/usr/include/c++/v1
/home/<username>/Test_Workspace
/home/<username>/Test_Workspace/build/qnx710
/home/<username>/Test_Workspace/build/qnx710/{USER_DEFINED}-L{USER_DEFINED}
------- Workspace parsing diagnostics -------
Number of files discovered (not excluded): 2873
Number of files parsed: 217
Other Extensions
No response
Additional context
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status