| 1 |
Version 1.17.1 |
| 2 |
~~~~~~~~~~~~ |
| 3 |
Released: 2026-03-22 |
| 4 |
|
| 5 |
Bugfixes: |
| 6 |
* fully-qualified-moc-types: Fix false positive regression for pointer/reference types in generics. |
| 7 |
|
| 8 |
Version 1.17 |
| 9 |
~~~~~~~~~~~~ |
| 10 |
Released: 2026-02-15 |
| 11 |
|
| 12 |
Bugfixes: |
| 13 |
* Fix non-pod-static check emitting warning for each entry of a container |
| 14 |
* Fix use-arrow-operator-instead-of-data emitting false positive when value is casted |
| 15 |
* Do not whitelist QVariant for detaching-temporary. QVariant::toString will provide a QString that is not detached |
| 16 |
* detaching-temporary properly checks conditions when more than two method calls are chained |
| 17 |
* Fixits for detaching-temporary/detaching-member are more reliable with fixit ranges for operator calls |
| 18 |
* When using QT_NAMESPACE, clazy properly handles Qt classes being in this specific namespace |
| 19 |
* Fix wrong replacement method for QMap::operator[] |
| 20 |
* Make project compile with LLVM22. qhash-namespace, fully-qualified-moc-types, old-style-connect tests are fixed |
| 21 |
* Adjust readlock-detaching check to work properly with Qt 6.11 changes |
| 22 |
* Move qstring-ref to manuallevel since it is not compatible with Qt6 |
| 23 |
|
| 24 |
Features: |
| 25 |
* New checks: |
| 26 |
- compare-member-check: Checks whether comparison operators do not use all member variables of a class. |
| 27 |
|
| 28 |
Notes: |
| 29 |
* C++20 is now required for compilation |
| 30 |
* qt6-\* porting checks are removed |
| 31 |
|
| 32 |
Version 1.16.1 |
| 33 |
~~~~~~~~~~~~ |
| 34 |
Released: 2026-03-22 |
| 35 |
|
| 36 |
Note: |
| 37 |
* This is a patch release to fix QtCreator integration issues and |
| 38 |
compatibility with new Qt versions. This release supports LLVM versions 19 to 21. |
| 39 |
|
| 40 |
Bugfixes: |
| 41 |
* Diagnostics are always emitted even if they contain no fixit. This is used |
| 42 |
for integration in IDEs where the clazy process writes a YAML file containing |
| 43 |
the messages, ranges and optionally fixits |
| 44 |
|
| 45 |
Version 1.16 |
| 46 |
~~~~~~~~~~~~ |
| 47 |
Released: 2025-09-03 |
| 48 |
|
| 49 |
Bugfixes: |
| 50 |
* unused-result-check: Fix crash when method decleration can not be resolved |
| 51 |
* use-chrono-in-qtimer: Fix crash when using precompiled headers |
| 52 |
* qt6-qhash-signature: Adapt check to use more proper logic for casts and fix crash in edgecases |
| 53 |
* Ensure that clang21 works properly with clazy and produces same line/letter number as before (mismatches with operator calls) |
| 54 |
* non-pod-global-static: Fix false positive with Q_IMPORT_PLUGIN in Qt-6.10 |
| 55 |
|
| 56 |
Features: |
| 57 |
* Clazy can finally be integrated into clang-tidy - one command to rule |
| 58 |
them all! All checks can be enabled using "clazy-<checkname>". For example: |
| 59 |
`clazy-qstring-arg,clazy-qfileinfo-exists`, enabling all checks using |
| 60 |
`clazy-*` will also enable manual checks. It is recommended to be more granular. |
| 61 |
The plugin can be loaded using `-load=ClazyClangTidy.so`, for this, the plugin |
| 62 |
must be in the LD_LIBRARY_PATH. Otherwise, an absolute path may be specified. |
| 63 |
* isempty-vs-count now provides fixits for all scenarios. Also, cases where |
| 64 |
the length is compared using "== 0", "< 1", "> 0" are now reported and have fixits. |
| 65 |
* qt6-\* Porting checks are considered deprecated now and will be removed in the next release of clazy |
| 66 |
* detaching-temporary and detaching-member checks provide fixits for methods that have const coutnerparts |
| 67 |
* NOLINT/NOLINTNEXTLINE/NOLINTBEGIN/NOLINTEND all work in clazy now as |
| 68 |
expected. Individual clazy checks can be disabled when using a "clazy-" |
| 69 |
prefix. For example "NOLINTNEXTLINE(clazy-qfileinfo-exists, clazy-qstring-arg)" |
| 70 |
|
| 71 |
Version 1.15 |
| 72 |
~~~~~~~~~~~~ |
| 73 |
Released: 2025-06-12 |
| 74 |
|
| 75 |
Bugfixes: |
| 76 |
* install-event-filter: Fix crash when there is no child at the given depth. BUG: 464372 |
| 77 |
* fully-qualified-moc-types: Fix enum/enum class not being evaluated. BUG: 423780 |
| 78 |
* Fixed crash in qstring-comparison-to-implicit-char. BUG: 502458 |
| 79 |
* Fixed crash when fully-qualified-moc-types encounters signals with expressions like "std::bitset<int(8)>" |
| 80 |
* Fixed crash in qvariant-template-instantiation |
| 81 |
|
| 82 |
Features: |
| 83 |
* New checks: |
| 84 |
- readlock-detaching |
| 85 |
* Update minimum Clang/LLVM to 19 |
| 86 |
* `clazy-standalone --version` contains git version ( output of `git describe`) if it is not a tagged commit |
| 87 |
* Added missing methods to checks for detaching temporary/member lists or maps |
| 88 |
|
| 89 |
Version 1.14 |
| 90 |
~~~~~~~~~~~~ |
| 91 |
Released: 2025-04-27 |
| 92 |
|
| 93 |
Notes: |
| 94 |
* Clazy warnings for the following line can be disabled, for example: clazy:exclude-next-line=check1,check2 |
| 95 |
* Support for compilation against Clang 20 |
| 96 |
* increase verbosity of some warning messages |
| 97 |
- checks `function-args-by-value` and `function-args-by-ref`: add function name and parameter name to warning message |
| 98 |
- checks `unused-non-trivial-variable` and `non-pod-global-static`: add variable name to warning message |
| 99 |
|
| 100 |
Features: |
| 101 |
* New checks: |
| 102 |
- qbytearray-conversion-to-c-style |
| 103 |
|
| 104 |
Version 1.13 |
| 105 |
~~~~~~~~~~~~ |
| 106 |
Released: 2024-12-28 |
| 107 |
|
| 108 |
Features: |
| 109 |
* New Checks: |
| 110 |
- used-qunused-variable |
| 111 |
|
| 112 |
Bugfixes: |
| 113 |
* qstring-arg check provides a fix-it |
| 114 |
* Fixed unused-non-trivial-variable to not warn when [[maybe_unused]] set |
| 115 |
* Fixed qstring-arg for upcoming Qt 6.9 |
| 116 |
* Fixed fully-qualified-moc-types false positive for const modifiers of generic arguments |
| 117 |
* Silence false positive non-pod-global-static warning for QML module initialization |
| 118 |
* Fix function-args-by-value false positive that would cause compile error |
| 119 |
in copy constructors, assignment operators and equal checks |
| 120 |
* False positives for `Q_EMIT(someSignal())` are now fixed |
| 121 |
|
| 122 |
Version 1.12 |
| 123 |
~~~~~~~~~~~~ |
| 124 |
Released: 2024-06-30 |
| 125 |
|
| 126 |
Features: |
| 127 |
* New Checks: |
| 128 |
- qt-keyword-emit |
| 129 |
- sanitize-inline-keyword |
| 130 |
|
| 131 |
Version 1.11 |
| 132 |
~~~~~~~~~~~~ |
| 133 |
Released: 2022-01-21 |
| 134 |
|
| 135 |
Features: |
| 136 |
* New Checks: |
| 137 |
- use-arrow-operator-instead-of-data |
| 138 |
- use-static-qregularexpression |
| 139 |
- unexpected-flag-enumerator-value |
| 140 |
- Removed inefficient-qlist check (Fixed in Qt6) |
| 141 |
|
| 142 |
Version 1.10 |
| 143 |
~~~~~~~~~~~~ |
| 144 |
Released: 2021-07-20 |
| 145 |
|
| 146 |
Features: |
| 147 |
* Requires C++17 |
| 148 |
Bugfixes: |
| 149 |
* Fixed a -Wclazy-lambda-in-connect false-positive |
| 150 |
* Fixed crash in copyable-polymorphic when PCH was enabled |
| 151 |
|
| 152 |
Version 1.9 |
| 153 |
~~~~~~~~~~~ |
| 154 |
Released: 2021-01-10 |
| 155 |
|
| 156 |
Bugfixes: |
| 157 |
* Fixed clazy slowdown introduced in 1.8. I can be up to 4x faster now. |
| 158 |
* range-loop was split in range-loop-detach and range-loop-reference |
| 159 |
* Fixed -Wclazy-connect-non-signal false positives |
| 160 |
|
| 161 |
Version 1.8 |
| 162 |
~~~~~~~~~~~ |
| 163 |
Released: 2020-11-22 |
| 164 |
|
| 165 |
Features: |
| 166 |
* New Checks: |
| 167 |
- qt6-qhash-signature |
| 168 |
- qt6-header-fixes |
| 169 |
- qt6-deprecated-api-fixes |
| 170 |
- use-chrono-in-qtimer |
| 171 |
- fixit for missing-qobject-macro |
| 172 |
|
| 173 |
Version 1.7 |
| 174 |
~~~~~~~~~~~ |
| 175 |
Released: 2020-06-29 |
| 176 |
|
| 177 |
Features: |
| 178 |
* New Checks: |
| 179 |
- overloaded signal |
| 180 |
- invalid JNI signatures |
| 181 |
- qstring-comparison-to-implicit-char |
| 182 |
- qt6-qlatin1string-to-u |
| 183 |
- heap-allocated-small-trivial-type: less false-positives |
| 184 |
|
| 185 |
Bugfixes: |
| 186 |
* connect-non-signal: Fix case where it didn't find the pmf |
| 187 |
* qstring-arg warns when using QLatin1String::arg(int), as it casts to QChar |
| 188 |
|
| 189 |
Notes: |
| 190 |
* Building clazy itself is 30% faster |
| 191 |
|
| 192 |
Version 1.6 |
| 193 |
~~~~~~~~~~~ |
| 194 |
Released: 2019-10-12 |
| 195 |
|
| 196 |
Features: |
| 197 |
* New Checks: |
| 198 |
- heap-allocated-small-trivial-type |
| 199 |
- signal-with-return-value |
| 200 |
- qproperty-type-mismatch, contributed by Jean-Michaël Celerier |
| 201 |
|
| 202 |
Notes: |
| 203 |
* Removed level3. Moved all level3 checks to manual level. Doesn't make sense to enable all of them. |
| 204 |
Each one must be carefully considered. |
| 205 |
* Minimum LLVM was bumped to 5.0 |
| 206 |
* Clazy no longer rewrites files directly, to avoid races when parallel invocations change the same header. |
| 207 |
* Clazy now exports a yaml file with the replacements, to be applied with clang-apply-replacements. |
| 208 |
The same way other clang tooling does it. |
| 209 |
* The way to enable code rewrite is now: -Xclang -plugin-arg-clazy -Xclang export-fixes for clang |
| 210 |
or -export-fixes=somefile.yaml for clazy-standalone |
| 211 |
* All other fixit arguments and fixit env variables were removed |
| 212 |
* Thanks to Christian Gagneraud for contributing the fixit yaml exporter! |
| 213 |
|
| 214 |
Bugfixes: |
| 215 |
* Fixed regressions with LLVM 9.0 |
| 216 |
* Fixit infrastructure was overhauled |
| 217 |
|
| 218 |
Version 1.5 |
| 219 |
~~~~~~~~~~~ |
| 220 |
Released: 2019-01-31 |
| 221 |
|
| 222 |
Features: |
| 223 |
* New Checks: |
| 224 |
- ifndef-define-typo |
| 225 |
- lowercase-qml-type-name |
| 226 |
- qrequiredresult-candidates |
| 227 |
* New Fixits: |
| 228 |
- range-loop now supports adding missing refs or const-ref |
| 229 |
- range-loop now supports adding qAsConst() |
| 230 |
- function-args-by-ref now adding missing refs or const-ref (experimental) |
| 231 |
- Introduced CLAZY_FIXIT_SUFFIX env variable |
| 232 |
|
| 233 |
Notes: |
| 234 |
* Removed support for the obscure -DCLAZY_BUILD_UTILS_LIB to simplify the CMakeLists.txt |
| 235 |
* Renamed the clazy plugin from ClangLazy.so to ClazyPlugin.so |
| 236 |
- fully-qualified-moc-types now warns for slot/invokable return values too. |
| 237 |
They need to be fully qualified for QML. |
| 238 |
|
| 239 |
Bugfixes: |
| 240 |
* Fixed a crash (clang assert) in raw-environment-function |
| 241 |
|
| 242 |
Version 1.4 |
| 243 |
~~~~~~~~~~~ |
| 244 |
Released: 2018-09-23 |
| 245 |
|
| 246 |
Features: |
| 247 |
* New Checks: |
| 248 |
- connect-by-name |
| 249 |
- skipped-base-method |
| 250 |
- qstring-varargs |
| 251 |
- fully-qualified-moc-types |
| 252 |
- qt-keywords, with fixit included |
| 253 |
- qhash-with-char-pointer-key |
| 254 |
- wrong-qevent-cast |
| 255 |
- static-pmf |
| 256 |
- raw-environment-function |
| 257 |
- empty-qstringliteral |
| 258 |
* auto-unexpected-qstringbuilder now also warns for lambdas returning QStringBuilder |
| 259 |
|
| 260 |
Notes: |
| 261 |
* performance optimizations |
| 262 |
* Added -header-filter=<regex> option to clazy-standalone. Only headers matching the regexp will |
| 263 |
have warnings, besides the .cpp file from the translation unit, which is never filtered out. |
| 264 |
* Added -ignore-dirs=<regex> option to clazy-standalone, and its CLAZY_IGNORE_DIRS env variable equivalent. |
| 265 |
* Added CLAZY_HEADER_FILTER env variable which adds above functionality to both clazy and clazy-standalone |
| 266 |
* unused-non-trivial-variable got unused-non-trivial-variable-no-whitelist option |
| 267 |
* unused-non-trivial-variable got user-blacklist and user-whitelist support |
| 268 |
* container-inside-loop is now a manual check instead of level2 |
| 269 |
* HiddenLevel was renamed to ManualLevel |
| 270 |
* connect-3arg-lambda now warns when passing a lambda to QTimer::singleShot() or QMenu::addAction() |
| 271 |
without a context object |
| 272 |
* old-style-connect warns for QMenu::addAction() and QMessageBox::open() too now |
| 273 |
|
| 274 |
Version 1.3 |
| 275 |
~~~~~~~~~~~ |
| 276 |
Released: 2017-11-26 |
| 277 |
|
| 278 |
Features: |
| 279 |
* New checks: |
| 280 |
- thread-with-slots |
| 281 |
- connect-3arg-lambda |
| 282 |
- qproperty-without-notify |
| 283 |
- virtual-signal |
| 284 |
- overridden-signal |
| 285 |
- qhash-namespace |
| 286 |
- const-signal-or-slot |
| 287 |
- lambda-unique-connection |
| 288 |
|
| 289 |
Notes: |
| 290 |
* missing-qobject-macro is now a level2 check, instead of level1. Because, people can omit Q_OBJECT intentionally. |
| 291 |
* Added -only-qt option, which will make clazy bailout early on non-Qt files. |
| 292 |
For this purpose, the definition of a Qt file is whenever -DQT_CORE_LIB is passed, |
| 293 |
which is usually the case in most build systems. |
| 294 |
* Added -qt-developer option, when building Qt with clazy it will honour specific guidelines for Qt, |
| 295 |
which are not many right now but the list will grow. |
| 296 |
|
| 297 |
Version 1.2 |
| 298 |
~~~~~~~~~~~ |
| 299 |
Released: 2017-07-08 |
| 300 |
|
| 301 |
Features: |
| 302 |
* New checks: |
| 303 |
- install-event-filter |
| 304 |
- qcolor-from-literal |
| 305 |
- strict-iterators |
| 306 |
- connect-not-normalized |
| 307 |
|
| 308 |
Bugfixes: |
| 309 |
* clazy-standalone executable. Allows to run clazy against a JSON compilation database |
| 310 |
instead of as a plugin. clang-tidy doesn't support loading external modules (https://github.com/llvm/llvm-project/issues/32086) |
| 311 |
so this is a good workaround. |
| 312 |
* qt-compat mode. Allows to disable Qt5 specific checks by passing -Xclang -plugin-arg-clazy -Xclang qt4-compat |
| 313 |
* returning-data-from-temporary now checks for temporary QByteArrays casting to char* when returned |
| 314 |
- returning-data-from-temporary now checks for assignment too, not only return statements |
| 315 |
* unused-non-trivial-variable now warns for unused QList, QVector and many more types |
| 316 |
* ASTMatchers based checks are now supported |
| 317 |
* clang 3.7 was dropped due to ASTMatchers source incompatibilities. |
| 318 |
* Use clazy v1.1 for clang >= 3.6 support |
| 319 |
* clazylib.so no longer gets built by default, only the plugin (ClangLazy.so) |
| 320 |
gets built. Pass -DCLAZY_BUILD_UTILS_LIB=ON to enable the utils library if |
| 321 |
you're developing tools using clazy's convenience functions, which you're |
| 322 |
probably not. |
| 323 |
* CLAZY_INSTALL_NO_HEADERS option was removed. Either install the utils library |
| 324 |
and headers or nothing at all. By default nothing is installed, except |
| 325 |
the plugin and man pages. |
| 326 |
|
| 327 |
Version 1.1 |
| 328 |
~~~~~~~~~~~ |
| 329 |
Released: 2017-02-20 |
| 330 |
|
| 331 |
Features: |
| 332 |
* macOS and Windows support |
| 333 |
* New checks: |
| 334 |
- child-event-qobject-cast |
| 335 |
- ctor-missing-parent-argument |
| 336 |
- returning-data-from-temporary |
| 337 |
- qt-macros |
| 338 |
- base-class-event |
| 339 |
- connect-non-signal |
| 340 |
- incorrect-emit |
| 341 |
- tr-non-literal |
| 342 |
* Fixes against: |
| 343 |
- clang 4.0 |
| 344 |
- Qt 5.9 |
| 345 |
Notes: |
| 346 |
* 60% performance improvement |
| 347 |
* Fixed many false positives |
| 348 |
|
| 349 |
|
| 350 |
Version 1.0 |
| 351 |
~~~~~~~~~~~ |
| 352 |
Released: 2016-09-12 |
| 353 |
|
| 354 |
|
| 355 |
Version 0.0.1 |
| 356 |
~~~~~~~~~~~~~ |
| 357 |
Released: 2015-06-10 |
| 358 |
|
| 359 |
Notes: |
| 360 |
* First release |