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

clangd uses compiler options for configured compiler

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: Qt Creator 7.0.0-beta2
    • Fix Version/s: Qt Creator 7.0.0-rc1
    • Component/s: C/C++/Obj-C++ Support
    • Labels:
      None
    • Environment:
      Kubuntu 21.10
    • Platform/s:
      Linux/X11
    • Commits:
      9735049e2c (qt-creator/qt-creator/7.0) 9735049e2c (qt-creator/tqtc-qt-creator/7.0) 9735049e2c (qt-creator/qt-creator/master) 9735049e2c (qt-creator/tqtc-qt-creator/master) 9735049e2c (qt-creator/qt-creator/qds-3.3)

      Description

      I have a CMake project that is configured (i.e. cmake command was run). The CMakeLists.txt contains compiler checking logic that selects compiler options specific to the compiler used. For instance, my system compiler is gcc, and CMakeLists.txt selects options supported by gcc.

      The problem is that clangd, being based on clang, does not support these compiler options, and reports errors at the beginning of every file.

      This does not happen when cland is not used.

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            kandeler Christian Kandeler
            Reporter:
            lastique Andrey Semashev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes