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

QtCreator cannot correctly parse Clang-Tidy output in Windows

XMLWordPrintable

      
      [1/2 0.4/sec] Building CXX object CMakeFiles\Hello.dir\main.cpp.obj
      
      C:\Users\navid\AppData\Roaming\vcpkg\installed\x64-windows\include\cryptopp/config.h:250:3: error: : "Unsupported configuration" [clang-diagnostic-error]
       # error: "Unsupported configuration"
      
      ^
      
      C:\Users\navid\Development\Hello\build-Desktop-Default\..\main.cpp:14:14: warning: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay]
      
      int* p = arr; // BAD, warning 26485 will be fired
      
      ^
      
      C:\Users\navid\Development\Hello\build-Desktop-Default\..\main.cpp:18:20: warning: do not use pointer arithmetic [cppcoreguidelines-pro-bounds-pointer-arithmetic]
      
      int* q = p + 1; // BAD, warning 26481 would be fired
      
      ^
      
      C:\Users\navid\Development\Hello\build-Desktop-Default\..\main.cpp:19:14: warning: do not use pointer arithmetic [cppcoreguidelines-pro-bounds-pointer-arithmetic]
      
      p = q++; // BAD, warning 26481 would be fired
      
      ^
      
      ..\main.cpp(16): warning C5030: attribute 'suppress' is not recognized
      
      

       

      I always have Clang-Tidy integrated into CMake. I think it is a way better approach to run in while compiling instead of what QtCreator doing right now with Clang-Tidy (running Clang-tidy when you input something).

       

      Anyhow, in Linux QtCreator correctly parses the clang-tidy output and shows the issues correctly inside "Issues" but in Windows, it seems QtCreator is not able to parse Clang-tidy. I don't have a working version of Linux right now but last time I was working with QtCreator in Linux it was capable of parsing the Clang-tidy output. I am only attaching the picture of the issue for Windows. (FWIW it correctly parses the compiler output and shows them in issues, but not clang-tidy).

        1. image-2018-04-13-00-17-51-822.png
          13 kB
          navidR
        2. image-2018-04-13-00-17-51-851.png
          10 kB
          navidR
        3. qt-creator-clang-tidy-output.PNG
          41 kB
          navidR
        4. qt-creator-issues.PNG
          6 kB
          navidR
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            hunger Tobias Hunger
            rahimi navidR
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes