Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-33763

Consider if we should support a wider range of Clangd

XMLWordPrintable

      A user is trying to use compiler provided by Intel oneAPI (setting that as the compiler of a kit):

      and consequently, the Clangd packed with Qt Creator does not seem to correctly recognize some APIs that it should, e.g. printf:

      Notice that although Intel oneAPI is in use, the actual code is nothing special. It's just a minimal "Hello World" thingy. And "printf" should not be something so special and unrecognizable.

      Although we allow Clangd binary from custom source, the one packed with Intel oneAPI:

      $ /opt/intel/oneapi/2025.2/bin/compiler/clangd --version
      Intel(R) oneAPI DPC++/C++ Compiler 2025.2.1 (2025.2.0.20250806)
      Features: linux
      Platform: x86_64-unknown-linux-gnu
      

      is not recognized correctly by QtC. QtC complains about "Failed to retrieve clangd version: Unexpected clangd output".

      By the way, this may or may not be related to QTCREATORBUG-28037 as it is suggested there that QtC not only accepts binary, but a script should also be fine. So it may be able to "trick" QtC that Clangd from Intel oneAPI (or whatever Clangd) produces reasonable output. If that is true, we may want to document that or implement some sort of configuration about that.

        1. compile_commands_gcc.json
          2 kB
          Luqiao Chen
        2. compile_commands_oneAPI.json
          1 kB
          Luqiao Chen
        3. image-2025-11-13-10-01-29-791.png
          370 kB
          Luqiao Chen
        4. screenshot-1.png
          169 kB
          Luqiao Chen
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            kandeler Christian Kandeler
            luqiaochen Luqiao Chen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes