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

clangd uses compiler options for configured compiler

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • Qt Creator 7.0.0-rc1
    • Qt Creator 7.0.0-beta2
    • C/C++/Obj-C++ Support
    • None
    • Kubuntu 21.10
    • Linux/X11
    • 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

            kandeler Christian Kandeler
            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