Version 1.17.1 ~~~~~~~~~~~~ Released: 2026-03-22 Bugfixes: * fully-qualified-moc-types: Fix false positive regression for pointer/reference types in generics. Version 1.17 ~~~~~~~~~~~~ Released: 2026-02-15 Bugfixes: * Fix non-pod-static check emitting warning for each entry of a container * Fix use-arrow-operator-instead-of-data emitting false positive when value is casted * Do not whitelist QVariant for detaching-temporary. QVariant::toString will provide a QString that is not detached * detaching-temporary properly checks conditions when more than two method calls are chained * Fixits for detaching-temporary/detaching-member are more reliable with fixit ranges for operator calls * When using QT_NAMESPACE, clazy properly handles Qt classes being in this specific namespace * Fix wrong replacement method for QMap::operator[] * Make project compile with LLVM22. qhash-namespace, fully-qualified-moc-types, old-style-connect tests are fixed * Adjust readlock-detaching check to work properly with Qt 6.11 changes * Move qstring-ref to manuallevel since it is not compatible with Qt6 Features: * New checks: - compare-member-check: Checks whether comparison operators do not use all member variables of a class. Notes: * C++20 is now required for compilation * qt6-\* porting checks are removed Version 1.16.1 ~~~~~~~~~~~~ Released: 2026-03-22 Note: * This is a patch release to fix QtCreator integration issues and compatibility with new Qt versions. This release supports LLVM versions 19 to 21. Bugfixes: * Diagnostics are always emitted even if they contain no fixit. This is used for integration in IDEs where the clazy process writes a YAML file containing the messages, ranges and optionally fixits Version 1.16 ~~~~~~~~~~~~ Released: 2025-09-03 Bugfixes: * unused-result-check: Fix crash when method decleration can not be resolved * use-chrono-in-qtimer: Fix crash when using precompiled headers * qt6-qhash-signature: Adapt check to use more proper logic for casts and fix crash in edgecases * Ensure that clang21 works properly with clazy and produces same line/letter number as before (mismatches with operator calls) * non-pod-global-static: Fix false positive with Q_IMPORT_PLUGIN in Qt-6.10 Features: * Clazy can finally be integrated into clang-tidy - one command to rule them all! All checks can be enabled using "clazy-". For example: `clazy-qstring-arg,clazy-qfileinfo-exists`, enabling all checks using `clazy-*` will also enable manual checks. It is recommended to be more granular. The plugin can be loaded using `-load=ClazyClangTidy.so`, for this, the plugin must be in the LD_LIBRARY_PATH. Otherwise, an absolute path may be specified. * isempty-vs-count now provides fixits for all scenarios. Also, cases where the length is compared using "== 0", "< 1", "> 0" are now reported and have fixits. * qt6-\* Porting checks are considered deprecated now and will be removed in the next release of clazy * detaching-temporary and detaching-member checks provide fixits for methods that have const coutnerparts * NOLINT/NOLINTNEXTLINE/NOLINTBEGIN/NOLINTEND all work in clazy now as expected. Individual clazy checks can be disabled when using a "clazy-" prefix. For example "NOLINTNEXTLINE(clazy-qfileinfo-exists, clazy-qstring-arg)" Version 1.15 ~~~~~~~~~~~~ Released: 2025-06-12 Bugfixes: * install-event-filter: Fix crash when there is no child at the given depth. BUG: 464372 * fully-qualified-moc-types: Fix enum/enum class not being evaluated. BUG: 423780 * Fixed crash in qstring-comparison-to-implicit-char. BUG: 502458 * Fixed crash when fully-qualified-moc-types encounters signals with expressions like "std::bitset" * Fixed crash in qvariant-template-instantiation Features: * New checks: - readlock-detaching * Update minimum Clang/LLVM to 19 * `clazy-standalone --version` contains git version ( output of `git describe`) if it is not a tagged commit * Added missing methods to checks for detaching temporary/member lists or maps Version 1.14 ~~~~~~~~~~~~ Released: 2025-04-27 Notes: * Clazy warnings for the following line can be disabled, for example: clazy:exclude-next-line=check1,check2 * Support for compilation against Clang 20 * increase verbosity of some warning messages - checks `function-args-by-value` and `function-args-by-ref`: add function name and parameter name to warning message - checks `unused-non-trivial-variable` and `non-pod-global-static`: add variable name to warning message Features: * New checks: - qbytearray-conversion-to-c-style Version 1.13 ~~~~~~~~~~~~ Released: 2024-12-28 Features: * New Checks: - used-qunused-variable Bugfixes: * qstring-arg check provides a fix-it * Fixed unused-non-trivial-variable to not warn when [[maybe_unused]] set * Fixed qstring-arg for upcoming Qt 6.9 * Fixed fully-qualified-moc-types false positive for const modifiers of generic arguments * Silence false positive non-pod-global-static warning for QML module initialization * Fix function-args-by-value false positive that would cause compile error in copy constructors, assignment operators and equal checks * False positives for `Q_EMIT(someSignal())` are now fixed Version 1.12 ~~~~~~~~~~~~ Released: 2024-06-30 Features: * New Checks: - qt-keyword-emit - sanitize-inline-keyword Version 1.11 ~~~~~~~~~~~~ Released: 2022-01-21 Features: * New Checks: - use-arrow-operator-instead-of-data - use-static-qregularexpression - unexpected-flag-enumerator-value - Removed inefficient-qlist check (Fixed in Qt6) Version 1.10 ~~~~~~~~~~~~ Released: 2021-07-20 Features: * Requires C++17 Bugfixes: * Fixed a -Wclazy-lambda-in-connect false-positive * Fixed crash in copyable-polymorphic when PCH was enabled Version 1.9 ~~~~~~~~~~~ Released: 2021-01-10 Bugfixes: * Fixed clazy slowdown introduced in 1.8. I can be up to 4x faster now. * range-loop was split in range-loop-detach and range-loop-reference * Fixed -Wclazy-connect-non-signal false positives Version 1.8 ~~~~~~~~~~~ Released: 2020-11-22 Features: * New Checks: - qt6-qhash-signature - qt6-header-fixes - qt6-deprecated-api-fixes - use-chrono-in-qtimer - fixit for missing-qobject-macro Version 1.7 ~~~~~~~~~~~ Released: 2020-06-29 Features: * New Checks: - overloaded signal - invalid JNI signatures - qstring-comparison-to-implicit-char - qt6-qlatin1string-to-u - heap-allocated-small-trivial-type: less false-positives Bugfixes: * connect-non-signal: Fix case where it didn't find the pmf * qstring-arg warns when using QLatin1String::arg(int), as it casts to QChar Notes: * Building clazy itself is 30% faster Version 1.6 ~~~~~~~~~~~ Released: 2019-10-12 Features: * New Checks: - heap-allocated-small-trivial-type - signal-with-return-value - qproperty-type-mismatch, contributed by Jean-Michaƫl Celerier Notes: * Removed level3. Moved all level3 checks to manual level. Doesn't make sense to enable all of them. Each one must be carefully considered. * Minimum LLVM was bumped to 5.0 * Clazy no longer rewrites files directly, to avoid races when parallel invocations change the same header. * Clazy now exports a yaml file with the replacements, to be applied with clang-apply-replacements. The same way other clang tooling does it. * The way to enable code rewrite is now: -Xclang -plugin-arg-clazy -Xclang export-fixes for clang or -export-fixes=somefile.yaml for clazy-standalone * All other fixit arguments and fixit env variables were removed * Thanks to Christian Gagneraud for contributing the fixit yaml exporter! Bugfixes: * Fixed regressions with LLVM 9.0 * Fixit infrastructure was overhauled Version 1.5 ~~~~~~~~~~~ Released: 2019-01-31 Features: * New Checks: - ifndef-define-typo - lowercase-qml-type-name - qrequiredresult-candidates * New Fixits: - range-loop now supports adding missing refs or const-ref - range-loop now supports adding qAsConst() - function-args-by-ref now adding missing refs or const-ref (experimental) - Introduced CLAZY_FIXIT_SUFFIX env variable Notes: * Removed support for the obscure -DCLAZY_BUILD_UTILS_LIB to simplify the CMakeLists.txt * Renamed the clazy plugin from ClangLazy.so to ClazyPlugin.so - fully-qualified-moc-types now warns for slot/invokable return values too. They need to be fully qualified for QML. Bugfixes: * Fixed a crash (clang assert) in raw-environment-function Version 1.4 ~~~~~~~~~~~ Released: 2018-09-23 Features: * New Checks: - connect-by-name - skipped-base-method - qstring-varargs - fully-qualified-moc-types - qt-keywords, with fixit included - qhash-with-char-pointer-key - wrong-qevent-cast - static-pmf - raw-environment-function - empty-qstringliteral * auto-unexpected-qstringbuilder now also warns for lambdas returning QStringBuilder Notes: * performance optimizations * Added -header-filter= option to clazy-standalone. Only headers matching the regexp will have warnings, besides the .cpp file from the translation unit, which is never filtered out. * Added -ignore-dirs= option to clazy-standalone, and its CLAZY_IGNORE_DIRS env variable equivalent. * Added CLAZY_HEADER_FILTER env variable which adds above functionality to both clazy and clazy-standalone * unused-non-trivial-variable got unused-non-trivial-variable-no-whitelist option * unused-non-trivial-variable got user-blacklist and user-whitelist support * container-inside-loop is now a manual check instead of level2 * HiddenLevel was renamed to ManualLevel * connect-3arg-lambda now warns when passing a lambda to QTimer::singleShot() or QMenu::addAction() without a context object * old-style-connect warns for QMenu::addAction() and QMessageBox::open() too now Version 1.3 ~~~~~~~~~~~ Released: 2017-11-26 Features: * New checks: - thread-with-slots - connect-3arg-lambda - qproperty-without-notify - virtual-signal - overridden-signal - qhash-namespace - const-signal-or-slot - lambda-unique-connection Notes: * missing-qobject-macro is now a level2 check, instead of level1. Because, people can omit Q_OBJECT intentionally. * Added -only-qt option, which will make clazy bailout early on non-Qt files. For this purpose, the definition of a Qt file is whenever -DQT_CORE_LIB is passed, which is usually the case in most build systems. * Added -qt-developer option, when building Qt with clazy it will honour specific guidelines for Qt, which are not many right now but the list will grow. Version 1.2 ~~~~~~~~~~~ Released: 2017-07-08 Features: * New checks: - install-event-filter - qcolor-from-literal - strict-iterators - connect-not-normalized Bugfixes: * clazy-standalone executable. Allows to run clazy against a JSON compilation database instead of as a plugin. clang-tidy doesn't support loading external modules (https://github.com/llvm/llvm-project/issues/32086) so this is a good workaround. * qt-compat mode. Allows to disable Qt5 specific checks by passing -Xclang -plugin-arg-clazy -Xclang qt4-compat * returning-data-from-temporary now checks for temporary QByteArrays casting to char* when returned - returning-data-from-temporary now checks for assignment too, not only return statements * unused-non-trivial-variable now warns for unused QList, QVector and many more types * ASTMatchers based checks are now supported * clang 3.7 was dropped due to ASTMatchers source incompatibilities. * Use clazy v1.1 for clang >= 3.6 support * clazylib.so no longer gets built by default, only the plugin (ClangLazy.so) gets built. Pass -DCLAZY_BUILD_UTILS_LIB=ON to enable the utils library if you're developing tools using clazy's convenience functions, which you're probably not. * CLAZY_INSTALL_NO_HEADERS option was removed. Either install the utils library and headers or nothing at all. By default nothing is installed, except the plugin and man pages. Version 1.1 ~~~~~~~~~~~ Released: 2017-02-20 Features: * macOS and Windows support * New checks: - child-event-qobject-cast - ctor-missing-parent-argument - returning-data-from-temporary - qt-macros - base-class-event - connect-non-signal - incorrect-emit - tr-non-literal * Fixes against: - clang 4.0 - Qt 5.9 Notes: * 60% performance improvement * Fixed many false positives Version 1.0 ~~~~~~~~~~~ Released: 2016-09-12 Version 0.0.1 ~~~~~~~~~~~~~ Released: 2015-06-10 Notes: * First release