Skip to content
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

Feature request: Add compiler querying support for QNX QCC #11853

Closed
samkearney opened this issue Jan 9, 2024 · 7 comments
Closed

Feature request: Add compiler querying support for QNX QCC #11853

samkearney opened this issue Jan 9, 2024 · 7 comments
Labels
compiler support Feature Request Language Service more votes needed Issues that have been postponed until more community members upvote it
Milestone

Comments

@samkearney
Copy link

Environment

  • OS and Version: Windows 10 Pro 22H2 (WSL, Ubuntu 22.04.3 LTS)
  • VS Code Version: 1.85.1
  • C/C++ Extension Version: 1.18.5
  • If using SSH remote, specify OS of remote machine: Dev Container - Ubuntu 22.04.3 LTS

Bug Summary and Steps to Reproduce

Bug Summary: I am working on C++ projects with a cross-compilation toolchain, the QNX Software Development Platform, which ships a GCC-compatible compiler. I configure my projects using CMake with a custom toolchain file which builds with this compiler, and there are no errors. But Intellisense shows red squiggles under random symbols and errors that don't correspond to what happens when I build the project, and "Go to Definition" sometimes takes me into native Linux system headers rather than the QNX SDP provided headers (which I expect, because I provided the compiler and sysroot in the CMake toolchain file).

When I do "Log Diagnostics", I can see that it seems like some of the settings are correct (e.g. my cross-compiler and arguments appear in the results) but some are incorrect (there are some sections that seem to be configured with native system tools)

Unfortunately, I don't think it will be possible to reproduce this issue without a licensed copy of the QNX SDP. But I would appreciate any debugging advice.

This has worked for me in the past. I'm not sure what changed.

Steps to reproduce:

  1. Configure a simple "Hello, World" C++ project with CMake on a system with the QNX SDP toolchain installed.
  2. Provide a CMake toolchain file for this toolchain, a CMakeUserPresets.json which selects this toolchain file, and configure the project using the CMake Tools extension.

Expected behavior:
Intellisense works properly

Actual behavior:
False error squiggles are shown:
image
(these errors do not appear when I build the project using the CMake Tools extension)

"Go To Definition" produces the wrong result:
gtd
(I would expect the path of the resolved header to be /opt/qnx700/target/qnx7/usr/include/c++/5.4.0/iostream)

Configuration and Logs

No `c_cpp_properties.json` (I am relying on my default setting that CMake Tools should be the configuration provider for CppTools)

Log Diagnostics Output
----------------------
-------- Diagnostics - 1/9/2024, 6:51:24 PM
Version: 1.18.5
Current Configuration:
{
    "name": "Linux",
    "includePath": [
        "/workspaces/mdns/**"
    ],
    "defines": [],
    "compilerPath": "/usr/bin/clang-15",
    "cStandard": "c17",
    "cppStandard": "c++14",
    "intelliSenseMode": "linux-clang-x64",
    "compilerPathInCppPropertiesJson": "/usr/bin/clang-15",
    "intelliSenseModeIsExplicit": false,
    "cStandardIsExplicit": false,
    "cppStandardIsExplicit": false,
    "mergeConfigurations": false,
    "compilerPathIsExplicit": false,
    "configurationProvider": "ms-vscode.cmake-tools",
    "browse": {
        "path": [
            "/workspaces/mdns/**",
            "${workspaceFolder}"
        ],
        "limitSymbolsToIncludedHeaders": true
    }
}
Custom browse configuration: 
{
    "browsePath": [
        "/workspaces/mdns"
    ],
    "compilerPath": "/opt/qnx700/host/linux/x86_64/usr/bin/QCC",
    "compilerArgs": [],
    "compilerFragments": [
        "--target=5.4.0,gcc_ntox86_gpp"
    ]
}
Custom configurations:
[ /workspaces/mdns/main.cpp ]
{
    "includePath": [],
    "defines": [],
    "compilerPath": "/opt/qnx700/host/linux/x86_64/usr/bin/QCC",
    "compilerArgs": [],
    "compilerFragments": [
        "--target=5.4.0,gcc_ntox86_gpp"
    ]
}
cpptools version (native): 1.18.3.0
Translation Unit Mappings:
[ /workspaces/mdns/main.cpp ]:
    /workspaces/mdns/main.cpp
    /usr/include/c++/11/iostream *
Translation Unit Configurations:
[ /workspaces/mdns/main.cpp ]:
    Process ID: 3162
    Memory Usage: 61 MB
    Includes:
        /usr/include/x86_64-linux-gnu/c++/11
        /usr/include/c++/11
        /usr/local/include
        /usr/lib/llvm-15/lib/clang/15.0.7/include
        /usr/include/x86_64-linux-gnu
        /usr/include
    Standard Version: c++17
    IntelliSense Mode: linux-gcc-x64
Total Memory Usage: 61 MB

------- Workspace parsing diagnostics -------
Number of files discovered (not excluded): 4992
Number of files parsed: 2

Other Extensions

No response

Additional context

Contents of my CMake toolchain file:

set(QNX_TARGET_PROCESSOR x86)

set(QCC_COMPILER_TARGET 5.4.0,gcc_nto${QNX_TARGET_PROCESSOR})
set(QCC_CXX_STD_LIBRARY _gpp)

set(CMAKE_SYSTEM_NAME      QNX)
set(CMAKE_SYSTEM_VERSION   7.0.0)
set(CMAKE_SYSTEM_PROCESSOR ${QNX_TARGET_PROCESSOR})
set(TOOLCHAIN              QNX)

if(NOT DEFINED ENV{QNX_HOST})
    message(FATAL_ERROR "QNX_HOST environment variable is not set")
endif()

if(NOT DEFINED ENV{QNX_TARGET})
    message(FATAL_ERROR "QNX_TARGET environment variable is not set")
endif()

if(NOT DEFINED ENV{QNX_CONFIGURATION})
    message(FATAL_ERROR "QNX_CONFIGURATION environment variable is not set")
endif()

set(QNX_HOST $ENV{QNX_HOST})
set(QNX_TARGET $ENV{QNX_TARGET})
set(QNX_CONFIGURATION $ENV{QNX_CONFIGURATION})

set(CMAKE_SHARED_LIBRARY_PREFIX "lib")
set(CMAKE_SHARED_LIBRARY_SUFFIX ".so")
set(CMAKE_STATIC_LIBRARY_PREFIX "lib")
set(CMAKE_STATIC_LIBRARY_SUFFIX ".a")

if(CMAKE_HOST_WIN32)
    set(HOST_EXECUTABLE_SUFFIX ".exe")
endif()

set(CMAKE_C_COMPILER ${QNX_HOST}/usr/bin/qcc${HOST_EXECUTABLE_SUFFIX})
set(CMAKE_C_COMPILER_TARGET ${QCC_COMPILER_TARGET})
set(CMAKE_CXX_COMPILER ${QNX_HOST}/usr/bin/QCC${HOST_EXECUTABLE_SUFFIX})
set(CMAKE_CXX_COMPILER_TARGET "${QCC_COMPILER_TARGET}${QCC_CXX_STD_LIBRARY}")

set(CMAKE_FIND_ROOT_PATH ${QNX_TARGET})
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE BOTH)

set(OPENSSL_ROOT_DIR "${QNX_TARGET}/${QNX_TARGET_PROCESSOR}/usr/")
@Colengms
Copy link
Contributor

Hi @samkearney . Could you enable the setting "C_Cpp.loggingLevel": "Debug" and provide the contents of the C/C++ output channel leading up to the repro, with a simple repro example? The C/C++ extension will try to "query" a GCC-compatible compiler. That log output might give us some insights into the results of that query. Since your configured paths refer to clang, I'm assuming that query failed, and your configuration is falling back to the default/detected compiler. Though, I would expect there to be an error message associated with that. And I would expect that to function properly with regards to simple standard library use.

Given that there exists documentation of specific command line arguments for QCC, I suspect it is not command-line compatible with GCC. Currenttly, the C/C++ extension supports detection of configuration information (system include paths and system defines) from compilers that are command-line compatible with GCC and Clang. If that is the problem, we can consider this issue a feature request to add compiler-querying support for QCC, if possible. (This is dependent on the compiler having command-line options, such as those supported by GCC and clang, which can be used to solicit system include paths and system defines from the compiler. Though, the list of arguments supported by QCC seems very limited.)

@Colengms Colengms self-assigned this Jan 16, 2024
@Colengms Colengms added Language Service more info needed The issue report is not actionable in its current state compiler support labels Jan 16, 2024
@samkearney
Copy link
Author

samkearney commented Jan 17, 2024

Hi @Colengms,

Thank you for the troubleshooting advice! You have pointed me in the right direction:

Log Output
loggingLevel: Debug
LSP: (received) cpptools/initialize (id: 1)
LSP: (invoked) cpptools/initialize (id: 1)
cpptools version (TypeScript): 1.18.5
cpptools version (native): 1.18.3.0
Autocomplete is enabled.
Error squiggles are enabled if all header dependencies are resolved.
Hover is enabled.
IntelliSense Engine = default.
LSP: (received) cpptools/queryCompilerDefaults (id: 2)
LSP: (invoked) cpptools/queryCompilerDefaults (id: 2)
Querying compiler for default C++ language standard using command line: /usr/bin/clang-15 -x c++ -E -dM /dev/null
Detected language standard version: c++14
Querying compiler's default target using command line: "/usr/bin/clang-15" -dumpmachine
Compiler returned default target value: x86_64-pc-linux-gnu
Compiler query command line: /usr/bin/clang-15 -std=c17 -m64 -Wp,-v -fno-blocks -E -dM -x c /dev/null
Attempting to get defaults from C compiler in "compilerPath" property: '/usr/bin/clang-15'
Compiler query command line: /usr/bin/clang-15 -std=c++14 -m64 -Wp,-v -fno-blocks -E -dM -x c++ /dev/null
Attempting to get defaults from C++ compiler in "compilerPath" property: '/usr/bin/clang-15'
LSP: (received) cpptools/queryCompilerDefaults (id: 3)
LSP: (invoked) cpptools/queryCompilerDefaults (id: 3)
LSP: (received) cpptools/didChangeCppProperties (id: 4)
LSP: (invoked) cpptools/didChangeCppProperties (id: 4)
Code browsing service initialized
  Folder: /usr/include/ will be indexed
  Folder: /usr/lib/llvm-15/lib/clang/15.0.7/include/ will be indexed
  Folder: /usr/local/include/ will be indexed
  Folder: /workspaces/cpptools-test/ will be indexed
Discovering files...
  Processing folder (recursive): /usr/include/
  Processing folder (recursive): /usr/lib/llvm-15/lib/clang/15.0.7/include/
  Processing folder (recursive): /usr/local/include/
  Processing folder (recursive): /workspaces/cpptools-test/
  Discovering files: 4955 file(s) processed
  0 file(s) removed from database
Done discovering files.
Populating include completion cache.
Parsing remaining files...
  tag parsing file: /workspaces/cpptools-test/main.cpp
  tag parsing file: /usr/include/c++/11/cstdio
  tag parsing file: /usr/include/c++/11/tr1/cstdio
  tag parsing file: /usr/include/c++/11/cstdint
  tag parsing file: /usr/include/c++/11/tr1/cstdint
  tag parsing file: /usr/include/netinet/in.h
  tag parsing file: /usr/include/x86_64-linux-gnu/sys/socket.h
  tag parsing file: /usr/include/arpa/inet.h
  tag parsing file: /usr/include/netdb.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/netdb.h
  tag parsing file: /usr/include/rpc/netdb.h
  tag parsing file: /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h
  tag parsing file: /usr/include/stdio.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/stdio.h
  tag parsing file: /usr/include/c++/11/tr1/stdio.h
  tag parsing file: /usr/include/c++/11/bits/c++0x_warning.h
  tag parsing file: /usr/include/stdint.h
  tag parsing file: /usr/lib/llvm-15/lib/clang/15.0.7/include/stdint.h
  tag parsing file: /usr/include/c++/11/tr1/stdint.h
  tag parsing file: /usr/include/features.h
  tag parsing file: /usr/include/c++/11/parallel/features.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/stdint-uintn.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/types.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/in.h
  tag parsing file: /usr/include/endian.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/endian.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/byteswap.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/uintn-identity.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/types/struct_iovec.h
  tag parsing file: /usr/include/linux/stddef.h
    tag parsing error (this can be ignored unless symbols can't be found):
    line 26 (col. 49): error: expected a ')'
  tag parsing file: /usr/lib/llvm-15/lib/clang/15.0.7/include/stddef.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/socket.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/types/struct_osockaddr.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/socket2.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/types/sigevent_t.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h
  tag parsing file: /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h
  tag parsing file: /usr/include/x86_64-linux-gnu/c++/11/bits/cpu_defines.h
  tag parsing file: /usr/include/c++/11/pstl/pstl_config.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/libc-header-start.h
  tag parsing file: /usr/lib/llvm-15/lib/clang/15.0.7/include/stdarg.h
  tag parsing file: /usr/include/c++/11/tr1/stdarg.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/types/__FILE.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/types/FILE.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/stdio_lim.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/floatn.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/getopt_posix.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/stdio2.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/stdio-ldbl.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/wchar.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/wordsize.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/stdint-intn.h
  tag parsing file: /usr/include/features-time64.h
  tag parsing file: /usr/include/stdc-predef.h
  tag parsing file: /usr/include/x86_64-linux-gnu/sys/cdefs.h
  tag parsing file: /usr/include/x86_64-linux-gnu/gnu/stubs.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/timesize.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/typesizes.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/time64.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/endianness.h
  tag parsing file: /usr/lib/llvm-15/lib/clang/15.0.7/include/__stddef_max_align_t.h
  tag parsing file: /usr/include/x86_64-linux-gnu/sys/types.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/socket_type.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/sockaddr.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/types/time_t.h
  tag parsing file: /usr/include/x86_64-linux-gnu/asm/socket.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/socket-constants.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/types/__sigval_t.h
  tag parsing file: /usr/include/c++/11/tr1/cstdarg
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/floatn-common.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/getopt_core.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/long-double.h
  tag parsing file: /usr/include/x86_64-linux-gnu/gnu/stubs-64.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/types/clock_t.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/types/timer_t.h
  tag parsing file: /usr/include/x86_64-linux-gnu/sys/select.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h
  tag parsing file: /usr/include/asm-generic/socket.h
  tag parsing file: /usr/include/c++/11/cstdarg
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/select.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/select2.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h
  tag parsing file: /usr/include/linux/posix_types.h
  tag parsing file: /usr/include/x86_64-linux-gnu/asm/sockios.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/struct_mutex.h
  tag parsing file: /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h
  tag parsing file: /usr/include/x86_64-linux-gnu/asm/posix_types.h
  tag parsing file: /usr/include/asm-generic/sockios.h
  tag parsing file: /usr/include/x86_64-linux-gnu/asm/posix_types_32.h
  tag parsing file: /usr/include/x86_64-linux-gnu/asm/posix_types_x32.h
  tag parsing file: /usr/include/x86_64-linux-gnu/asm/posix_types_64.h
  tag parsing file: /usr/include/asm-generic/posix_types.h
  tag parsing file: /usr/include/x86_64-linux-gnu/asm/bitsperlong.h
  tag parsing file: /usr/include/asm-generic/bitsperlong.h
  Parsing: 105 files(s) processed
Done parsing remaining files.
Custom configuration provider 'CMake Tools' registered
LSP: (received) cpptools/didChangeCppProperties (id: 5)
LSP: (received) cpptools/pauseParsing
LSP: (received) cpptools/clearCustomConfigurations
LSP: (invoked) cpptools/didChangeCppProperties (id: 5)
  Folder: /usr/include/ will be indexed
  Folder: /usr/lib/llvm-15/lib/clang/15.0.7/include/ will be indexed
  Folder: /usr/local/include/ will be indexed
  Folder: /workspaces/cpptools-test/ will be indexed
LSP: (invoked) cpptools/pauseParsing
LSP: (invoked) cpptools/clearCustomConfigurations
LSP: (received) cpptools/clearCustomConfigurations
LSP: (invoked) cpptools/clearCustomConfigurations
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/.cmake
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/.cmake/api
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/.cmake/api/v1
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/.cmake/api/v1/query
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/.cmake/api/v1/query/client-vscode
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/.cmake/api/v1/query/client-vscode/query.json
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/3.26.2
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/3.26.2/CMakeCCompiler.cmake
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/3.26.2/CMakeSystem.cmake
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/3.26.2/CompilerIdC
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/3.26.2/CompilerIdC/CMakeCCompilerId.c
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/.cmake
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/3.26.2/CompilerIdC/a.out
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/3.26.2/CompilerIdCXX
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/3.26.2/CompilerIdCXX/CMakeCXXCompilerId.cpp
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/3.26.2/CompilerIdCXX/CMakeCXXCompilerId.o
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/CMakeConfigureLog.yaml
LSP: (received) cpptools/fileDeleted: file:///workspaces/cpptools-test/build/CMakeFiles/3.26.2/CompilerIdC/tmp
LSP: (received) cpptools/fileDeleted: file:///workspaces/cpptools-test/build/CMakeFiles/3.26.2/CMakeSystem.cmake.tmp
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/.cmake/api
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/.cmake/api/v1
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/.cmake/api/v1/query
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/.cmake/api/v1/query/client-vscode
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/.cmake/api/v1/query/client-vscode/query.json
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/3.26.2
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/3.26.2/CMakeCCompiler.cmake
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/3.26.2/CMakeSystem.cmake
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/3.26.2/CompilerIdC
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/3.26.2/CompilerIdC/CMakeCCompilerId.c
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/3.26.2/CompilerIdC/a.out
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/3.26.2/CompilerIdCXX
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/3.26.2/CompilerIdCXX/CMakeCXXCompilerId.cpp
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/3.26.2/CompilerIdCXX/CMakeCXXCompilerId.o
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/CMakeConfigureLog.yaml
LSP: (invoked) cpptools/fileDeleted: file:///workspaces/cpptools-test/build/CMakeFiles/3.26.2/CompilerIdC/tmp
  tag parsing file: /workspaces/cpptools-test/build/CMakeFiles/3.26.2/CompilerIdC/CMakeCCompilerId.c
LSP: (invoked) cpptools/fileDeleted: file:///workspaces/cpptools-test/build/CMakeFiles/3.26.2/CMakeSystem.cmake.tmp
  tag parsing file: /workspaces/cpptools-test/build/CMakeFiles/3.26.2/CompilerIdCXX/CMakeCXXCompilerId.cpp
Custom browse configuration received: {
  "browsePath": [
    "/workspaces/cpptools-test"
  ],
  "compilerPath": "/opt/qnx700/host/linux/x86_64/usr/bin/QCC",
  "compilerArgs": [],
  "compilerFragments": [
    "--target=5.4.0,gcc_ntox86_gpp"
  ]
}
LSP: (received) cpptools/queryCompilerDefaults (id: 6)
LSP: (invoked) cpptools/queryCompilerDefaults (id: 6)
LSP: (received) cpptools/didChangeCustomBrowseConfiguration
LSP: (received) cpptools/clearCustomConfigurations
LSP: (received) cpptools/resumeParsing
Querying compiler for default C++ language standard using command line: /opt/qnx700/host/linux/x86_64/usr/bin/QCC -x c++ -E -dM /dev/null
Querying compiler for default C++ language standard using command line: /opt/qnx700/host/linux/x86_64/usr/bin/QCC -x c++ -E -dM /dev/null
Detected language standard version: c++98
Querying compiler's default target using command line: "/opt/qnx700/host/linux/x86_64/usr/bin/QCC" -dumpmachine
LSP: (invoked) cpptools/didChangeCustomBrowseConfiguration
Querying compiler for default C++ language standard using command line: /opt/qnx700/host/linux/x86_64/usr/bin/QCC -x c++ -E -dM /dev/null
Querying compiler for default C++ language standard using command line: /opt/qnx700/host/linux/x86_64/usr/bin/QCC -x c++ -E -dM /dev/null
Detected language standard version: c++98
Querying compiler's default target using command line: "/opt/qnx700/host/linux/x86_64/usr/bin/QCC" -dumpmachine
Compiler query command line: /opt/qnx700/host/linux/x86_64/usr/bin/QCC --target=5.4.0,gcc_ntox86_gpp -std=c++17 -Wp,-v -E -dM -x c++ /dev/null
cc: unknown option: '--target=5.4.0,gcc_ntox86_gpp'

Attempting to get defaults from C++ compiler in "compilerPath" property: '/opt/qnx700/host/linux/x86_64/usr/bin/QCC'
  Folder: /usr/local/include/ will be indexed
  Folder: /usr/lib/llvm-15/lib/clang/15.0.7/include/ will be indexed
  Folder: /usr/include/ will be indexed
  Folder: /workspaces/cpptools-test/ will be indexed
LSP: (invoked) cpptools/clearCustomConfigurations
LSP: (invoked) cpptools/resumeParsing
Discovering files...
  Processing folder (recursive): /usr/local/include/
  Processing folder (recursive): /usr/lib/llvm-15/lib/clang/15.0.7/include/
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/.cmake/api/v1/reply
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/.cmake/api/v1/reply/cmakeFiles-v1-2f794aa5ca582cb42089.json
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/.cmake/api/v1/reply
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/.cmake/api/v1/reply/codemodel-v2-6c0ff4d6e837f65d4b34.json
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/.cmake/api/v1/reply/directory-.-f5ebdc15457944623624.json
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/.cmake/api/v1/reply/index-2024-01-17T00-22-17-0313.json
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/.cmake/api/v1/reply/cmakeFiles-v1-2f794aa5ca582cb42089.json
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/.cmake/api/v1/reply/target-test-79f08b8d35aa6994db0f.json
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/.cmake/api/v1/reply/toolchains-v1-907bf3596368367f0d47.json
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeCache.txt
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/3.26.2/CMakeCXXCompiler.cmake
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/3.26.2/CMakeDetermineCompilerABI_C.bin
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/3.26.2/CMakeDetermineCompilerABI_CXX.bin
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/3.26.2/CompilerIdCXX/a.out
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/CMakeDirectoryInformation.cmake
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/CMakeScratch
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/Makefile.cmake
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/Makefile2
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/TargetDirectories.txt
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/cmake.check_cache
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/progress.marks
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/test.dir
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/test.dir/DependInfo.cmake
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/test.dir/build.make
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/test.dir/cmake_clean.cmake
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/test.dir/compiler_depend.make
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/test.dir/compiler_depend.ts
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/test.dir/depend.make
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/test.dir/flags.make
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/test.dir/link.txt
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/test.dir/progress.make
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/Makefile
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/cmake_install.cmake
LSP: (received) cpptools/fileCreated: file:///workspaces/cpptools-test/build/compile_commands.json
LSP: (received) cpptools/fileDeleted: file:///workspaces/cpptools-test/build/CMakeFiles/test.dir/build.make.tmp5e98b
LSP: (received) cpptools/fileDeleted: file:///workspaces/cpptools-test/build/CMakeFiles/CMakeScratch/TryCompile-yHKzil
LSP: (received) cpptools/fileDeleted: file:///workspaces/cpptools-test/build/CMakeFiles/3.26.2/CompilerIdCXX/CMakeCXXCompilerId.o
LSP: (received) cpptools/fileDeleted: file:///workspaces/cpptools-test/build/CMakeFiles/CMakeScratch/TryCompile-XMPXjX/CMakeLists.txt
LSP: (received) cpptools/fileDeleted: file:///workspaces/cpptools-test/build/CMakeFiles/CMakeScratch/TryCompile-XMPXjX/CMakeFiles/pkgRedirects
LSP: (received) cpptools/fileDeleted: file:///workspaces/cpptools-test/build/CMakeFiles/CMakeScratch/TryCompile-XMPXjX/CMakeFiles/cmTC_f0ece.dir/depend.make
LSP: (received) cpptools/fileDeleted: file:///workspaces/cpptools-test/build/CMakeFiles/CMakeScratch/TryCompile-XMPXjX/CMakeFiles/cmTC_f0ece.dir/compiler_depend.ts
LSP: (received) cpptools/fileDeleted: file:///workspaces/cpptools-test/build/CMakeFiles/CMakeScratch/TryCompile-XMPXjX/CMakeFiles/cmTC_f0ece.dir/build.make.tmp1605c
LSP: (received) cpptools/fileDeleted: file:///workspaces/cpptools-test/build/CMakeFiles/CMakeScratch/TryCompile-XMPXjX/CMakeFiles/cmTC_f0ece.dir/flags.make.tmp6f67e
LSP: (received) cpptools/fileDeleted: file:///workspaces/cpptools-test/build/CMakeFiles/CMakeScratch/TryCompile-XMPXjX/CMakeFiles/cmTC_f0ece.dir/compiler_depend.make
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/.cmake/api/v1/reply/codemodel-v2-6c0ff4d6e837f65d4b34.json
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/.cmake/api/v1/reply/directory-.-f5ebdc15457944623624.json
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/.cmake/api/v1/reply/index-2024-01-17T00-22-17-0313.json
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/.cmake/api/v1/reply/target-test-79f08b8d35aa6994db0f.json
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/.cmake/api/v1/reply/toolchains-v1-907bf3596368367f0d47.json
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeCache.txt
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/3.26.2/CMakeCXXCompiler.cmake
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/3.26.2/CMakeDetermineCompilerABI_C.bin
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/3.26.2/CMakeDetermineCompilerABI_CXX.bin
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/3.26.2/CompilerIdCXX/a.out
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/CMakeDirectoryInformation.cmake
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/CMakeScratch
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/Makefile.cmake
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/Makefile2
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/TargetDirectories.txt
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/cmake.check_cache
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/progress.marks
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/test.dir
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/test.dir/DependInfo.cmake
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/test.dir/build.make
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/test.dir/cmake_clean.cmake
  Processing folder (recursive): /usr/include/
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/test.dir/compiler_depend.make
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/test.dir/compiler_depend.ts
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/test.dir/depend.make
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/test.dir/flags.make
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/test.dir/link.txt
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/CMakeFiles/test.dir/progress.make
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/Makefile
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/cmake_install.cmake
LSP: (invoked) cpptools/fileCreated: file:///workspaces/cpptools-test/build/compile_commands.json
LSP: (invoked) cpptools/fileDeleted: file:///workspaces/cpptools-test/build/CMakeFiles/test.dir/build.make.tmp5e98b
LSP: (invoked) cpptools/fileDeleted: file:///workspaces/cpptools-test/build/CMakeFiles/CMakeScratch/TryCompile-yHKzil
LSP: (invoked) cpptools/fileDeleted: file:///workspaces/cpptools-test/build/CMakeFiles/3.26.2/CompilerIdCXX/CMakeCXXCompilerId.o
LSP: (invoked) cpptools/fileDeleted: file:///workspaces/cpptools-test/build/CMakeFiles/CMakeScratch/TryCompile-XMPXjX/CMakeLists.txt
LSP: (invoked) cpptools/fileDeleted: file:///workspaces/cpptools-test/build/CMakeFiles/CMakeScratch/TryCompile-XMPXjX/CMakeFiles/pkgRedirects
LSP: (invoked) cpptools/fileDeleted: file:///workspaces/cpptools-test/build/CMakeFiles/CMakeScratch/TryCompile-XMPXjX/CMakeFiles/cmTC_f0ece.dir/depend.make
LSP: (invoked) cpptools/fileDeleted: file:///workspaces/cpptools-test/build/CMakeFiles/CMakeScratch/TryCompile-XMPXjX/CMakeFiles/cmTC_f0ece.dir/compiler_depend.ts
LSP: (invoked) cpptools/fileDeleted: file:///workspaces/cpptools-test/build/CMakeFiles/CMakeScratch/TryCompile-XMPXjX/CMakeFiles/cmTC_f0ece.dir/build.make.tmp1605c
LSP: (invoked) cpptools/fileDeleted: file:///workspaces/cpptools-test/build/CMakeFiles/CMakeScratch/TryCompile-XMPXjX/CMakeFiles/cmTC_f0ece.dir/flags.make.tmp6f67e
LSP: (invoked) cpptools/fileDeleted: file:///workspaces/cpptools-test/build/CMakeFiles/CMakeScratch/TryCompile-XMPXjX/CMakeFiles/cmTC_f0ece.dir/compiler_depend.make
  Processing folder (recursive): /workspaces/cpptools-test/
  Discovering files: 4992 file(s) processed
  0 file(s) removed from database
Done discovering files.
Populating include completion cache.
Parsing remaining files...
  tag parsing file: /workspaces/cpptools-test/build/CMakeFiles/3.26.2/CompilerIdC/CMakeCCompilerId.c
  tag parsing file: /workspaces/cpptools-test/build/CMakeFiles/3.26.2/CompilerIdCXX/CMakeCXXCompilerId.cpp
  Parsing: 2 files(s) processed
Done parsing remaining files.
LSP: (received) cpptools/didChangeCustomBrowseConfiguration
LSP: (received) cpptools/resumeParsing
LSP: (invoked) cpptools/didChangeCustomBrowseConfiguration
LSP: (invoked) cpptools/resumeParsing

I encountered two issues with the command line arguments for querying the compiler. The first one was cc: unknown option: '--target=5.4.0,gcc_ntox86_gpp' (visible in the log above) which I believe is propagated from this line in the CMake toolchain file:

set(CMAKE_CXX_COMPILER_TARGET "5.4.0,gcc_ntox86_gpp") # note: variables expanded

Looks like this is an instance of CMake differing from the extension somehow, because the command line generated by CMake is -V5.4.0,gcc_ntox86_gpp, not --target=5.4.0,gcc_ntox86_gpp.

Unfortunately if I try to work around this by adding that -V flag manually, I run into an issue that is harder to overcome:

Compiler query command line: /opt/qnx700/host/linux/x86_64/usr/bin/QCC -V5.4.0,gcc_ntox86_gpp -std=c++17 -Wp,-v -E -dM -x c++ /dev/null
cc: unknown option: '-dM'

Having looked up -dM, I can see why it is probably pretty critical to configuring the intellisense properly.

QCC is QNX's "frontend" compiler, which passes sources and arguments through to a GCC-based cross compiler (after verifying your license 😄), but I see that their command line interface leaves a bit to be desired in terms of full GCC compatibility.

However, after playing around with qcc at the command line, I think it could work to pass that argument using -Wp:

Snip
dev@6f99606ef827:~$ qcc -V5.4.0,gcc_ntox86_gpp -std=c++17 -Wp,-v -E -dM -x c++ /dev/null
cc: unknown option: '-dM'
dev@6f99606ef827:~$ qcc -V5.4.0,gcc_ntox86_gpp -std=c++17 -Wp,-v -E -Wp,-dM -x c++ /dev/null
ignoring duplicate directory "/opt/qnx700/host/linux/x86_64/usr/lib/gcc/i586-pc-nto-qnx7.0.0/5.4.0/include"
ignoring nonexistent directory "/opt/qnx700/target/qnx7/usr/i586-pc-nto-qnx7.0.0/include"
ignoring duplicate directory "/opt/qnx700/target/qnx7/usr/include"
#include "..." search starts here:
#include <...> search starts here:
 /opt/qnx700/host/linux/x86_64/usr/lib/gcc/i586-pc-nto-qnx7.0.0/5.4.0/include
 /opt/qnx700/target/qnx7/usr/include/c++/5.4.0
 /opt/qnx700/target/qnx7/usr/include/c++/5.4.0/i586-pc-nto-qnx7.0.0
 /opt/qnx700/target/qnx7/usr/include/c++/5.4.0/backward
 /opt/qnx700/target/qnx7/usr/include
End of search list.
#define __DBL_MIN_EXP__ (-1021)
#define __cpp_attributes 200809
#define __UINT_LEAST16_MAX__ 0xffff
#define __ATOMIC_ACQUIRE 2
#define __FLT_MIN__ 1.17549435082228750797e-38F
#define __GCC_IEC_559_COMPLEX 2
#define __cpp_aggregate_nsdmi 201304
#define __UINT_LEAST8_TYPE__ unsigned char
#define __SIZEOF_FLOAT80__ 12
#define __INTMAX_C(c) c ## LL
#define __CHAR_BIT__ 8
#define __UINT8_MAX__ 0xff
#define __i586 1
#define __WINT_MAX__ 0x7fffffff
#define __cpp_static_assert 200410
#define __ORDER_LITTLE_ENDIAN__ 1234
#define __SIZE_MAX__ 0xffffffffU
#define __WCHAR_MAX__ 0xffffffffU
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1
#define __DBL_DENORM_MIN__ double(4.94065645841246544177e-324L)
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1
#define __GCC_ATOMIC_CHAR_LOCK_FREE 2
#define __GCC_IEC_559 2
#define __FLT_EVAL_METHOD__ 2
#define __unix__ 1
#define __cpp_binary_literals 201304
#define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 2
#define __cpp_variadic_templates 200704
#define __UINT_FAST64_MAX__ 0xffffffffffffffffULL
#define __SIG_ATOMIC_TYPE__ int
#define __PRAGMA_PACK_PUSH_POP__ 1
#define __DBL_MIN_10_EXP__ (-307)
#define __FINITE_MATH_ONLY__ 0
#define __cpp_variable_templates 201304
#define __GNUC_PATCHLEVEL__ 0
#define __UINT_FAST8_MAX__ 0xff
#define __has_include(STR) __has_include__(STR)
#define __DEC64_MAX_EXP__ 385
#define __INT8_C(c) c
#define __UINT_LEAST64_MAX__ 0xffffffffffffffffULL
#define __SHRT_MAX__ 0x7fff
#define __LDBL_MAX__ 1.18973149535723176502e+4932L
#define __UINT_LEAST8_MAX__ 0xff
#define __GCC_ATOMIC_BOOL_LOCK_FREE 2
#define __UINTMAX_TYPE__ long long unsigned int
#define __DEC32_EPSILON__ 1E-6DF
#define __unix 1
#define __UINT32_MAX__ 0xffffffffU
#define __GXX_EXPERIMENTAL_CXX0X__ 1
#define __LDBL_MAX_EXP__ 16384
#define __WINT_MIN__ (-__WINT_MAX__ - 1)
#define __SCHAR_MAX__ 0x7f
#define __WCHAR_MIN__ 0U
#define __INT64_C(c) c ## LL
#define __DBL_DIG__ 15
#define __GCC_ATOMIC_POINTER_LOCK_FREE 2
#define __SIZEOF_INT__ 4
#define __SIZEOF_POINTER__ 4
#define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 2
#define __QNXNTO__ 1
#define __USER_LABEL_PREFIX__
#define __STDC_HOSTED__ 1
#define __LDBL_HAS_INFINITY__ 1
#define __FLT_EPSILON__ 1.19209289550781250000e-7F
#define __GXX_WEAK__ 1
#define __LDBL_MIN__ 3.36210314311209350626e-4932L
#define __DEC32_MAX__ 9.999999E96DF
#define __INT32_MAX__ 0x7fffffff
#define __SIZEOF_LONG__ 4
#define __UINT16_C(c) c
#define __DECIMAL_DIG__ 21
#define __HAVE_SPECULATION_SAFE_LOAD 1
#define __has_include_next(STR) __has_include_next__(STR)
#define __LDBL_HAS_QUIET_NAN__ 1
#define __GNUC__ 5
#define __GXX_RTTI 1
#define __pie__ 2
#define __cpp_delegating_constructors 200604
#define __FLT_HAS_DENORM__ 1
#define __SIZEOF_LONG_DOUBLE__ 12
#define __BIGGEST_ALIGNMENT__ 16
#define __STDC_UTF_16__ 1
#define __DBL_MAX__ double(1.79769313486231570815e+308L)
#define __cpp_raw_strings 200710
#define __INT_FAST32_MAX__ 0x7fffffff
#define __DBL_HAS_INFINITY__ 1
#define __INT64_MAX__ 0x7fffffffffffffffLL
#define __DEC32_MIN_EXP__ (-94)
#define __INT_FAST16_TYPE__ short int
#define __STRICT_ANSI__ 1
#define __LDBL_HAS_DENORM__ 1
#define __cplusplus 201500L
#define __cpp_ref_qualifiers 200710
#define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL
#define __INT_LEAST32_MAX__ 0x7fffffff
#define __QNX__ 1
#define __DEC32_MIN__ 1E-95DF
#define __pentium 1
#define __DEPRECATED 1
#define __DBL_MAX_EXP__ 1024
#define __DEC128_EPSILON__ 1E-33DL
#define __ATOMIC_HLE_RELEASE 131072
#define __PTRDIFF_MAX__ 0x7fffffff
#define __ATOMIC_HLE_ACQUIRE 65536
#define __GNUG__ 5
#define __LONG_LONG_MAX__ 0x7fffffffffffffffLL
#define __SIZEOF_SIZE_T__ 4
#define __cpp_rvalue_reference 200610
#define __cpp_nsdmi 200809
#define __SIZEOF_WINT_T__ 4
#define __cpp_initializer_lists 200806
#define __GCC_HAVE_DWARF2_CFI_ASM 1
#define __GXX_ABI_VERSION 1009
#define __FLT_MIN_EXP__ (-125)
#define __cpp_lambdas 200907
#define __INT_FAST64_TYPE__ long long int
#define __DBL_MIN__ double(2.22507385850720138309e-308L)
#define __PIE__ 2
#define __FLT_MIN_10_EXP__ (-37)
#define __DEC128_MIN__ 1E-6143DL
#define __REGISTER_PREFIX__
#define __UINT16_MAX__ 0xffff
#define __DBL_HAS_DENORM__ 1
#define __UINT8_TYPE__ unsigned char
#define __NO_INLINE__ 1
#define __i386 1
#define __FLT_MANT_DIG__ 24
#define __i586__ 1
#define __VERSION__ "5.4.0 [qnx700 1327]"
#define __UINT64_C(c) c ## ULL
#define __cpp_unicode_characters 200704
#define __cpp_decltype_auto 201304
#define __GCC_ATOMIC_INT_LOCK_FREE 2
#define __FLOAT_WORD_ORDER__ __ORDER_LITTLE_ENDIAN__
#define __INT32_C(c) c
#define __DEC64_EPSILON__ 1E-15DD
#define __ORDER_PDP_ENDIAN__ 3412
#define __DEC128_MIN_EXP__ (-6142)
#define __code_model_32__ 1
#define __INT_FAST32_TYPE__ int
#define __UINT_LEAST16_TYPE__ short unsigned int
#define __INT16_MAX__ 0x7fff
#define __i386__ 1
#define __cpp_rtti 199711
#define __SIZE_TYPE__ unsigned int
#define __UINT64_MAX__ 0xffffffffffffffffULL
#define __INT8_TYPE__ signed char
#define __cpp_digit_separators 201309
#define __ELF__ 1
#define __FLT_RADIX__ 2
#define __INT_LEAST16_TYPE__ short int
#define __LDBL_EPSILON__ 1.08420217248550443401e-19L
#define __UINTMAX_C(c) c ## ULL
#define __SIG_ATOMIC_MAX__ 0x7fffffff
#define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 2
#define __SIZEOF_PTRDIFF_T__ 4
#define __pentium__ 1
#define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF
#define __LITTLEENDIAN__ 1
#define __INT_FAST16_MAX__ 0x7fff
#define __UINT_FAST32_MAX__ 0xffffffffU
#define __UINT_LEAST64_TYPE__ long long unsigned int
#define __FLT_HAS_QUIET_NAN__ 1
#define __FLT_MAX_10_EXP__ 38
#define __LONG_MAX__ 0x7fffffffL
#define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL
#define __FLT_HAS_INFINITY__ 1
#define __cpp_unicode_literals 200710
#define __UINT_FAST16_TYPE__ short unsigned int
#define __DEC64_MAX__ 9.999999999999999E384DD
#define __X86__ 1
#define __CHAR16_TYPE__ short unsigned int
#define __PRAGMA_REDEFINE_EXTNAME 1
#define __INT_LEAST16_MAX__ 0x7fff
#define __DEC64_MANT_DIG__ 16
#define __UINT_LEAST32_MAX__ 0xffffffffU
#define __GCC_ATOMIC_LONG_LOCK_FREE 2
#define __INT_LEAST64_TYPE__ long long int
#define __INT16_TYPE__ short int
#define __INT_LEAST8_TYPE__ signed char
#define __DEC32_MAX_EXP__ 97
#define __INT_FAST8_MAX__ 0x7f
#define __INTPTR_MAX__ 0x7fffffff
#define __cpp_sized_deallocation 201309
#define __cpp_range_based_for 200907
#define __EXCEPTIONS 1
#define __LDBL_MANT_DIG__ 64
#define __DBL_HAS_QUIET_NAN__ 1
#define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1)
#define __cpp_return_type_deduction 201304
#define __INTPTR_TYPE__ int
#define __UINT16_TYPE__ short unsigned int
#define __WCHAR_TYPE__ unsigned int
#define __SIZEOF_FLOAT__ 4
#define __pic__ 2
#define __UINTPTR_MAX__ 0xffffffffU
#define __DEC64_MIN_EXP__ (-382)
#define __cpp_decltype 200707
#define __INT_FAST64_MAX__ 0x7fffffffffffffffLL
#define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1
#define __FLT_DIG__ 6
#define __UINT_FAST64_TYPE__ long long unsigned int
#define __INT_MAX__ 0x7fffffff
#define __INT64_TYPE__ long long int
#define __FLT_MAX_EXP__ 128
#define __DBL_MANT_DIG__ 53
#define __cpp_inheriting_constructors 200802
#define __SIZEOF_FLOAT128__ 16
#define __INT_LEAST64_MAX__ 0x7fffffffffffffffLL
#define __DEC64_MIN__ 1E-383DD
#define __WINT_TYPE__ int
#define __UINT_LEAST32_TYPE__ unsigned int
#define __SIZEOF_SHORT__ 2
#define __LDBL_MIN_EXP__ (-16381)
#define __INT_LEAST8_MAX__ 0x7f
#define __WCHAR_UNSIGNED__ 1
#define __LDBL_MAX_10_EXP__ 4932
#define __ATOMIC_RELAXED 0
#define __DBL_EPSILON__ double(2.22044604925031308085e-16L)
#define __UINT8_C(c) c
#define __INT_LEAST32_TYPE__ int
#define __SIZEOF_WCHAR_T__ 4
#define __UINT64_TYPE__ long long unsigned int
#define __INT_FAST8_TYPE__ signed char
#define __GNUC_STDC_INLINE__ 1
#define __DBL_DECIMAL_DIG__ 17
#define __STDC_UTF_32__ 1
#define __DEC_EVAL_METHOD__ 2
#define __ORDER_BIG_ENDIAN__ 4321
#define __cpp_runtime_arrays 198712
#define __UINT32_C(c) c ## U
#define __INTMAX_MAX__ 0x7fffffffffffffffLL
#define __cpp_alias_templates 200704
#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
#define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F
#define __INT8_MAX__ 0x7f
#define __PIC__ 2
#define __UINT_FAST32_TYPE__ unsigned int
#define __CHAR32_TYPE__ unsigned int
#define __FLT_MAX__ 3.40282346638528859812e+38F
#define __cpp_constexpr 201304
#define __GNU_INDIRECT_FUNCTION__ 1
#define __INT32_TYPE__ int
#define __SIZEOF_DOUBLE__ 8
#define __cpp_exceptions 199711
#define __INTMAX_TYPE__ long long int
#define __DEC128_MAX_EXP__ 6145
#define __ATOMIC_CONSUME 1
#define __GNUC_MINOR__ 4
#define __UINTMAX_MAX__ 0xffffffffffffffffULL
#define __DEC32_MANT_DIG__ 7
#define __DBL_MAX_10_EXP__ 308
#define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L
#define __INT16_C(c) c
#define __cpp_generic_lambdas 201304
#define __STDC__ 1
#define __PTRDIFF_TYPE__ int
#define __ATOMIC_SEQ_CST 5
#define __UINT32_TYPE__ unsigned int
#define __UINTPTR_TYPE__ unsigned int
#define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD
#define __DEC128_MANT_DIG__ 34
#define __LDBL_MIN_10_EXP__ (-4931)
#define __SIZEOF_LONG_LONG__ 8
#define __cpp_user_defined_literals 200809
#define __GCC_ATOMIC_LLONG_LOCK_FREE 2
#define __LDBL_DIG__ 18
#define __FLT_DECIMAL_DIG__ 9
#define __UINT_FAST16_MAX__ 0xffff
#define __GCC_ATOMIC_SHORT_LOCK_FREE 2
#define __UINT_FAST8_TYPE__ unsigned char
#define __cpp_init_captures 201304
#define __ATOMIC_ACQ_REL 4
#define __ATOMIC_RELEASE 3

I don't have any way of knowing if there are further incompatibilities hiding behind this one (are there more queries with potentially more unsupported arguments?) but I think this could be a decent starting point for a feature request for QCC support:

  • Translate CMAKE_CXX_COMPILER_TARGET to -V instead of --target
  • Use -Wp,-dM instead of -dM

Thanks!

@samkearney samkearney changed the title CMake-configured intellisense does not work correctly when using a custom toolchain (QNX SDP) Feature request: Add compiler querying support for QNX QCC Jan 17, 2024
@samkearney
Copy link
Author

Oh, and just to check off the remaining things from your message:

Though, I would expect there to be an error message associated with that.

I agree.

And I would expect that to function properly with regards to simple standard library use.

I think this might have something to do with the dev container I'm using. It's detecting clang, but when I jump to definition it goes to a GCC C++ header. I'm assuming that's what's causing the squiggles. It's based on a stock Ubuntu docker image, and I have LLVM 15 installed in there so I can use clang-format and clang-tidy, but I'm not using clang itself (or native GCC for that matter). Anyway, not really relevant to my issue, but I wanted to satisfy my curiosity.

@Colengms Colengms added Feature Request and removed more info needed The issue report is not actionable in its current state labels Jan 19, 2024
@Colengms Colengms added this to the Triage milestone Jan 19, 2024
@Colengms Colengms removed their assignment Jan 19, 2024
Copy link

This feature request is being closed due to insufficient upvotes. Please leave a 👍-upvote or 👎-downvote reaction on the issue to help us prioritize it. When enough upvotes are received, this issue will be eligible for our backlog.

@github-actions github-actions bot added the more votes needed Issues that have been postponed until more community members upvote it label Mar 20, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 20, 2024
@samkearney
Copy link
Author

🤔

This is a pretty niche toolchain, so I don't see this feature request getting "enough upvotes", whatever that may be.

@Colengms should I give up hope on this? Can I implement it myself? I tried to find in the code where this compiler querying is done but with no luck. Maybe you could point me in the right direction?

@bobbrow
Copy link
Member

bobbrow commented Mar 20, 2024

@samkearney, when we finish #6931, it will probably be your best option.

@techsupport-noah
Copy link

This feature would be great! Being able to fully use vscode over the shipped ide of qnx like this would be great!
The missing involvement of this fr is probably due to qnx being used more like behind closed doors, even though its very wide spread you don't hear from it too much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler support Feature Request Language Service more votes needed Issues that have been postponed until more community members upvote it
Projects
None yet
Development

No branches or pull requests

4 participants