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

Qt Creator 8 and clangd warning: Included Header header.h is not used (fix available)!

    XMLWordPrintable

Details

    • macOS, Windows

    Description

      My project: all the sources are in the 'src' folder nested in the project folder (Project/src).
      With Qt Creator 8.0 I get clangd warnings: Included Header header.h is not used (fix available).

      And this is the wrong response from clangd because those headers are being used in source files!!!

      We have %LocalAppData%\clangd\config.yaml - general clangd config file:

      1. This file was generated by Qt Creator and will be overwritten unless you remove this line.
        Hover:
        ShowAKA: Yes
        Diagnostics:
        UnusedIncludes: Strict

      And we shouldn't edit this file.

      To avoid this clangd warning I edit config.yaml and make it read-only:

      Hover:
      ShowAKA: Yes
      Diagnostics:
      UnusedIncludes: None

      And the clangd warnings disappear! But, this is not good way!

      I tried to create '.clangd' file inside project with the same content but it does not work (clangd does not has any reactions on this file).

      What's wrong?! Please, assist me to resolve this problem!

      Attachments

        Activity

          People

            kandeler Christian Kandeler
            dsso Alexander Bychkov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: