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

Clang-Tidy no longer works correctly in version 15

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • Qt Creator 15.0.0
    • None
    • C++17, Qt Creator, Cygwin, CMake
    • Windows

    Description

      Since Qt Creator 15, Clang-Tidy has not been functioning properly. When I select a custom diagnostic configuration and choose "modernize" checks entirely, all the checks work as expected. However, if I remove specific checks from the configuration, Clang-Tidy stops functioning altogether.

      Steps to reproduce:

      1. Open Qt Creator 15 or newer.
      2. Configure a custom diagnostic setup for Clang-Tidy.
      3. Select all "modernize" checks (e.g., modernize-*).
      4. Run the analysis and observe that the checks work as expected.
      5. Remove some specific checks (e.g., modernize-use-nullptr).
      6. Run the analysis again and notice that Clang-Tidy fails to work.

      Error-Msg (anonymized) :

      Analysis of "C:\path\to\file.h" failed: Clang-Tidy exited with return code 1.
      Command line: C:\path\to\clang-tidy.exe "config={Checks: ',modernize-/avoid-,modernize-/concat-nested-namespaces,modernize-/deprecated-,modernize-/loop-convert,modernize-/macro-to-enum,modernize-/make-,modernize-/min-max-use-initializer-list,modernize-/pass-by-value,modernize-/raw-string-literal,modernize-/redundant-void-arg,modernize-/replace-,modernize-/return-braced-init-list,modernize-/shrink-to-fit,modernize-/type-traits,modernize-/unary-static-assert,modernize-/use-/auto,modernize-/use-/bool-literals,modernize-/use-/constraints,modernize-/use-/default-member-init,modernize-/use-/designated-initializers,modernize-/use-/emplace,modernize-/use-/equals-,modernize-/use-/nodiscard,modernize-/use-/noexcept,modernize-/use-/override,modernize-/use-/ranges,modernize-/use-/starts-ends-with,modernize-/use-/std-,modernize-/use-/trailing-return-type,modernize-/use-/transparent-functors,modernize-/use-/uncaught-exceptions,modernize-/use-/using,clang-diagnostic', CheckOptions: []}" -p C:\path\to\temp\project "-export-fixes=C:\path\to\temp\fixes.yaml" C:\path\to\file.h
      Process error: 5
      Output:
      USAGE: clang-tidy.exe [options] <source0> [... <sourceN>]OPTIONS:Generic Options:  -help                           - Display available options (-help-hidden for more)
      ....

      Attachments

        Issue Links

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

          Activity

            People

              kandeler Christian Kandeler
              clangfan devcppXP devcppXP
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes