aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* qstring-allocations: Fix unit-tests with llvm-10Sergio Martins2020-04-192-6/+32
| | | | | | | Wasn't warning for: QStringList list = { "foo" }; The child CXXConstructExprs appear in the AST but are never visited.
* Fix build issues using llvm 10.0.0Johannes Ziegenbalg2020-03-282-0/+14
|
* Fix clazy-standalone always needing a source file nameSergio Martins2019-11-031-13/+1
| | | | | | | | | fixes --list-checks I can't reproduce the failure anymore so removing the llvm-9 workarounds CCMAIL: kfunk@kde.org
* Dont' generate an empty yaml file if there's no fixitsSergio Martins2019-11-021-4/+7
| | | | CCMAIL: kfunk@kde.org
* Fix build with MSVCCristian Adam2019-10-091-0/+1
| | | | | | std::isspace is part of <cctype> REVIEW: D24513
* qproperty-type-mismatch: Fix build on WindowsSergio Martins2019-10-071-1/+1
| | | | MSVC doesn't know about 'uint'
* qproperty-type-mismatch: Fix unit-tests with llvm-9Sergio Martins2019-10-051-0/+3
| | | | Prior to version 9 the last character was missing in the macro
* qproperty-without-notify: Fix false-positives with llvm-9Sergio Martins2019-10-031-0/+3
| | | | Before llvm-9 the last character was missing.
* Comment-out unintentional debugSergio Martins2019-10-031-1/+1
|
* Fix clazy-standalone with llvm-9Sergio Martins2019-10-031-1/+14
| | | | | | | | | | | | | | | | | | | This is a temporary fix so it doesn't block distros from using clazy with llvm-9. And I'm not even sure others can reproduce, as it might be a local compiler bug here. Debugged it quite a bit and couldn't reach any conclusion. Nikolai, it would be great if you could run: $ cd tests/ $ clazy-standalone auto-unexpected-qstringbuilder/main.cpp after having uncommented: // llvm::errs() << optionsParser.getSourcePathList().size() << "\n"; in ClazyStandaloneMain.cpp should not print 0 CCMAIL: nikolai.kosjar@qt.io
* amend last commit with the actual fixSergio Martins2019-10-011-0/+4
|
* qproperty-type-mismatch: Fix more false-positives with typedefsSergio Martins2019-10-012-11/+14
| | | | Typedefs from system headers (such as Qt) were being ignored
* Allow to visit typedefs even in system headersSergio Martins2019-10-013-1/+18
| | | | As some checks need to know about all typedefs
* qproperty-type-mismatch: Fix more false-positives due to typedefsSergio Martins2019-10-012-8/+7
|
* qproperty-time-mismatch: Fix false-positives about QPrivateSignalSergio Martins2019-10-011-2/+5
|
* qproperty-type-mismatch: Support '*' being next to property nameSergio Martins2019-09-301-1/+15
|
* qproperty-type-mismatch: comment-out warnings about "too many arguments"Sergio Martins2019-09-301-2/+5
| | | | | These don't indicate bugs and are common place. We can maybe wrap them with an option to enable them.
* qproperty-type-mismatch: Don't warn if notify signal has too many paramsSergio Martins2019-09-291-1/+0
| | | | | | | having more than 1 param is commonplace and not a bug. Although elegant to only have 1, if we warn we'll produce lots of noise and people will probably disable this check instead, failing to find more important bugs
* qproperty-type-mismatch: Be more robust against typedefsSergio Martins2019-09-291-0/+7
|
* qproperty-type-mismatch: refactorSergio Martins2019-09-292-22/+41
| | | | Type comparison is made in several places, so add it to a function
* qproperty-type-mismatch: Fix false positiveSergio Martins2019-09-292-7/+10
| | | | When using inner classes as Q_PROPERTY
* qproperty-type-mismatch: Dont' warn about signal having 0 argsSergio Martins2019-09-291-4/+0
| | | | | It's common place for the NOTIFY signal to not have arguments, and there's no performance improvement on not adding one
* qproperty-type-mismatch: fix a bunch of false positivesSergio Martins2019-09-291-7/+3
| | | | | Namely enums and bool properties. Enums had the enum tag when printing, and bool was Bool_.
* Move containerNeverDetaches() into range-loop.cppSergio Martins2019-09-223-45/+45
| | | | | It's a bit of an hack and very specific to range-loop, not something to be reused
* range-loop: Fix some true-negatives that didn't suggest qAsConst()Sergio Martins2019-09-221-1/+14
| | | | | | | | This now warns: QStringList list = getList(); for (const QString &s : list) CCMAIL: dfaure@kde.org
* Remove unused private memberSergio Martins2019-09-212-2/+0
|
* Add '-list-checks' command line optionNikolai Kosjar2019-09-134-5/+27
| | | | | | Summary: This is in line with the same option of clang-tidy. Differential Revision: https://phabricator.kde.org/D23872
* Remove unused parameterNikolai Kosjar2019-09-132-3/+3
| | | | | | Reviewers: smartins Differential Revision: https://phabricator.kde.org/D23871
* Add '-supported-checks-json' command line optionNikolai Kosjar2019-09-131-1/+13
| | | | | | | | | | | | Summary: ...to dump the contents of checks.json. This is useful for IDEs as they can find out now whether a particular check is supported. BUG: 409986 Differential Revision: https://phabricator.kde.org/D23680
* qproperty-type-mismatch: Move to manual levelSergio Martins2019-09-033-2/+2
| | | | has many false positives for now
* Add a commit to FixitExporterSergio Martins2019-09-031-0/+1
|
* Introduce qproperty-type-mismatchJean-Michaël Celerier2019-09-033-0/+350
| | | | | | | Warns when any of the functions or variables declared in a Q_PROPERTY have types, arguments or return types differing with the Q_PROPERTY. REVIEW: D22962
* Fix exporting built-in warnings to yamlSergio Martins2019-09-011-5/+16
| | | | | | The message didn't have the [checkName] tags BUG: 411440
* Fix -export-fixes on clazy-standalone with multiple filesSergio Martins2019-08-047-19/+54
| | | | | | | TUDiag was being exported multiple times rewriting the same file. Export at the end only. BUG: 409983
* Rename variable for readabilitySergio Martins2019-08-041-4/+5
|
* Add a mini AST dumperSérgio Martins2019-06-042-0/+144
| | | | Just to dump records and translation units-for now.
* Add missing overrideSergio Martins2019-06-041-1/+1
|
* signal-with-return-value: warn for by-ref signal argumentsSergio Martins2019-06-031-4/+8
| | | | For the same reason as return values
* Introduce signal-with-return-valueSérgio Martins2019-06-033-0/+103
| | | | It's a design smell to have signals returning values
* unneeded-cast: Improve warning message for unneeded qobject_castSergio Martins2019-05-272-4/+14
| | | | | | | | | Instead of saying that no cast to base is needed, simply say that no qobject_cast is needed. Since a static_cast might still be needed. This is the case for the ternary operator. BUG: 407981
* Fix build with llvm trunkSergio Martins2019-05-192-2/+13
| | | | CCBUG: 407623
* Remove unused ClazyFixItOptionsSergio Martins2019-05-131-25/+0
|
* Minor class documentation improvementChristian Gagneraud2019-05-131-3/+2
|
* clang plugin: remove reference to CLAZY_FIXIT from help messageChristian Gagneraud2019-05-131-3/+0
| | | | Differential Revision: https://phabricator.kde.org/D21178
* Use clazy namespace instead of TypeUtilsSergio Martins2019-05-1230-75/+75
|
* Introduce heap-allocated-small-trivial-typeSergio Martins2019-05-123-0/+99
| | | | | | | Catches heap-allocating small trivially copyable/destructible types. Such as: auto p = new QPoint(); Could contain false-positives, hence going to manual level.
* Add TypeUtils::isSmallTrivial()Sergio Martins2019-05-122-0/+44
|
* TypeUtils: Make it optional to pass the VarDeclSergio Martins2019-05-116-18/+17
| | | | So we can test generic QualTypes too
* qvariant-template-instantiation: Move out of level 0, since it has ↵Sergio Martins2019-05-093-2/+2
| | | | | | | | | | | | | | | | false-positives This check has really been noise since its creation. The rate of false-positives don't justify the insignificant compilation performance gains. Moved to manual level now. Currently it has a bug, which doesn't seem possible to solve, as the instantiated template doesn't carry over the information about the qint32 typedef. And the CallExpr doesn't have any template related getters. Also removed this check from the "performance" category in checks.json, since this category is for runtime performance. CCBUG: 407321
* inefficient-qlist: Dont warn for QVariantListSergio Martins2019-05-091-2/+2
| | | | | It's commonly used to interact with Qt API. This will be solved in Qt 6 anyway.