Hi

If I compile my cmake-based project from Qt Creator 11.0.2 on Windows using
the build tools that come with MS Visual Studio 2022, the project compiles
without errors or warnings emitted. However, if I run clang-tidy on the
entire project, there are quite a few files that cannot be processed due to
compile errors in the file. If I open those files with errors in Creator, I
see the red circle in the margin, indicating an error, on the same lines
that clang-tidy complains about.

Clearly clangd/clang-tidy and MSVC are doing something different if the
compile is successful only in MSVC, but I can't figure out why that would
be.

In the QtC global settings for clangd, I have "Build-system warnings"
selected for Diagnostic configuration. In the project settings for this
project, "Use global settings" is checked for everything, including Clang
Tools and clangd. I am using the default clangd and clang-tidy executables
that ship with QtC.

We are suppressing quite a few warnings in our CMakeLists.txt files, and
the command lines I see for clang-tidy.exe don't have corresponding -Wno...
flags, so maybe that's the problem. If so, it's not clear to me how to work
around this, especially since I have "Build-system warnings" selected for
clangd diagnostics.

Thanks for any ideas

Adam
-- 
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator

Reply via email to