aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Workaround crash with LLVM 7upstream/1.3Sergio Martins2018-09-222-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | If clazy is compiled with clang instead of gcc it might crash with: ==10637== Process terminating with default action of signal 11 (SIGSEGV): dumping core ==10637== Access not within mapped region at address 0x8 ==10637== at 0x19CDD8C: clang::ast_matchers::MatchFinder::MatchFinder(clang::ast_matchers::MatchFinder::MatchFinderOptions) (in /usr/lib/llvm-7/bin/clang) ==10637== by 0x9D75670: ClazyASTConsumer (Clazy.cpp:62) ==10637== by 0x9D75670: ClazyASTAction::CreateASTConsumer(clang::CompilerInstance&, llvm::StringRef) (Clazy.cpp:183) ==10637== by 0x9E29ED: clang::FrontendAction::CreateWrappedASTConsumer(clang::CompilerInstance&, llvm::StringRef) (in /usr/lib/llvm-7/bin/clang) ==10637== by 0x9E8FCA: clang::FrontendAction::BeginSourceFile(clang::CompilerInstance&, clang::FrontendInputFile const&) (in /usr/lib/llvm-7/bin/clang) ==10637== by 0x9AE3D5: clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (in /usr/lib/llvm-7/bin/clang) ==10637== by 0xA8C9FA: clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (in /usr/lib/llvm-7/bin/clang) ==10637== by 0x5822C7: cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (in /usr/lib/llvm-7/bin/clang) ==10637== by 0x571ACC: main (in /usr/lib/llvm-7/bin/clang) After debugging clazy and clang's code I couldn't find anything wrong with it. Valgrind's output doesn't make much sense, and simply compiling the Clazy.cpp translation unit with gcc instead of clang makes the crash go away and valgrind's output is clean. I'm assuming debian's LLVM was built with gcc and building clazy with clang will have some sort of incompatibility, or maybe it's simply a clang bug. The downside of this workaround is that qcolor-literal check will be disabled. Next step will be producing a minimal test case and reporting to LLVM. BUG: 392223 CCMAIL: Woebbeking@kde.org
* Require cmake 3.3 as minimumSergio Martins2018-09-201-1/+1
| | | | | This amends the previous commit. Linking full path needs 3.3 as minimum, probably so CMP0060 is enabled.
* Link against full paths instead of -lfooSergio Martins2018-09-202-13/+15
| | | | | Fixes clazy linking against system libraries when it was told to use a LLVM from prefix
* prospective fix for crash with clang-7.0Sergio Martins2018-09-192-3/+6
| | | | | | | | | | This shuffles the code around in hope of avoiding what seems to be a clang bug. The backtrace and valgrind report don't make sense to me, and the crash goes away if building clazy with gcc. CCBUG: 392223
* Fix running tests with Qt 5.11Sergio Martins2018-09-191-2/+2
|
* Fix doc path to FHS path usr/share/doc, patch by Scarlett Moore ↵Jonathan Riddell2018-09-191-1/+1
| | | | <sgclark@kde.org>
* Fix build with clang 7.0Sergio Martins2018-09-191-4/+14
| | | | (cherry-picked from 06edd15fdda9155b54366d3887a4fbf25cf1d911)
* Don't recommend QStringLiteral in Q_GLOBAL_STATIC_WITH_ARGSSergio Martins2018-03-133-0/+15
| | | | | | Doesn't compile since it got noexcept BUG: 391807
* inefficient-qlist: Fix crash on incomplete typesWilliam Bader2018-01-241-1/+1
| | | | BUG: 389360
* Fix clazy.bat when it's in a path with spacesSergio Martins2018-01-172-2/+2
| | | | Needs some quotes, thanks thomas!
* detaching-temporary: Fix failing unit-testSergio Martins2018-01-093-5/+3
| | | | The operator path should only be executed on first iteration
* writing-to-temporary: Fix false-positiveSergio Martins2018-01-093-2/+7
| | | | | This was matching: (should() ? container1 : container2).append("")
* writing-to-temporary: Add failing unit-testSergio Martins2018-01-091-0/+8
|
* rule-of-three: Improve last commitSergio Martins2018-01-084-6/+30
| | | | | | | | | | Now it also fixes the second bug Our previous fix wasn't being run because it was in the if (numImplemeted == 1), so failed for the case where we have a user-dtor, user-copy-ctor and deleted-copy-assign. Moving the check out of the if fixes it. BUG: 388682
* rule-of-three: Don't warn if either copy-assign or copy-ctor is deletedSergio Martins2018-01-084-1/+36
| | | | | | | | It's safe, as it won't happen that one of the user-methods will do something different from the compiler-generated-method, as one of them can't be called. BUG: 388677
* qdeleteall: Reword the warning message a bitSergio Martins2017-12-192-16/+17
| | | | | | | | | | When you're using qDeleteAll(c.keys()) you should use qDeleteAll(c.keyBegin(), c.keyEnd()) The new messages are: warning: qDeleteAll() is being used on an unnecessary temporary container created by QMap::values(), use qDeleteAll(mycontainer) instead [-Wclazy-qdeleteall] warning: qDeleteAll() is being used on an unnecessary temporary container created by QMap::keys(), use qDeleteAll(mycontainer.keyBegin(), mycontainer.keyEnd()) instead [-Wclazy-qdeleteall] CCMAIL: aacid@kde.org
* Fix Utils::containsNonConstMemberCall()Sergio Martins2017-12-101-21/+41
| | | | | The parent() calls were not working since those nodes weren't visited yet. Also fixes the unit-tests.
* Utils::containsNonConstMemberCall() now honours assign operatorSergio Martins2017-12-089-41/+62
| | | | | | | Was returning false previously. Fixes a false positive in range-loop. CCMAIL: Ch.Ehrlicher@gmx.de
* Changelog fix, thread-with-slots was added in v1.3Sergio Martins2017-12-061-1/+1
|
* Fix build due to missing includeSergio Martins2017-12-041-0/+1
|
* Don't try to fix strings with escaped bytesSergio Martins2017-12-036-1/+47
| | | | | | | | | While QString::fromUtf8("ö") is equal to QString::fromUtf8("\xc3\xb6"), QStringLiteral("ö") is not equal to QStringLiteral("\xc3\xb6") because the escaped bytes won't be converted to utf-16 but instead used directly as is. CCMAIL: faure@kde.org CCMAIL: montel@kde.org
* connect-3arg-lambda: refactor this checkSergio Martins2017-12-013-19/+63
| | | | | No longer advises to pass 'this' as 3rd argument, because it might make sense to pass another object there, should be the user to decide.
* ChangeLog: Update the 1.3 release datev1.3Sergio Martins2017-11-261-1/+1
|
* README: Update list of checksSergio Martins2017-11-261-1/+9
| | | | Added the new stuff from 1.3
* run_tests: Remove unused variableSergio Martins2017-11-261-1/+0
|
* run_tests: return success if XFAIL, and failure if XOKSergio Martins2017-11-261-4/+5
| | | | An expected failure should exit with code 0
* run_tests: Unset env variable CLAZY_NO_WERROR before running testsSergio Martins2017-11-241-0/+3
| | | | So the user's env variables don't influence test outcome
* Update ClazyAnchorHeader.h for the 1.3 releaseSergio Martins2017-11-241-2/+22
|
* README: Remove warning that only makes sense for master branchSergio Martins2017-11-231-2/+0
|
* Update README for 1.3 releaseSergio Martins2017-11-231-4/+5
|
* README: Improve clazy-standalone instructions for macOSSergio Martins2017-11-231-0/+1
|
* Introduce lambda-unique-connectionSergio Martins2017-11-1810-16/+184
| | | | | | | Qt::UniqueConnection only works with member functions, not functors or lambdas. CCMAIL: filipe.azevedo@kdab.com
* const-signal-or-slot: Don't print an error when connecting to lambdaSergio Martins2017-11-152-3/+7
| | | | | | returning nullptr is enough BUG: 386940
* old-style-connect: Only execute Qt specific code in Qt developer modeSergio Martins2017-11-082-2/+4
|
* old-style-connect: Fix fixit bug when using Q_PRIVATE_SLOTSergio Martins2017-11-083-17/+35
| | | | | | | | | | | If the QObject has a signal with the same name of a Q_PRIVATE_SLOT then the fixit would connect to the signal instead of the private slot. The fix is generic, if the user used the SLOT macro we simply never rewrite to use a signal. CCMAIL: dfaure@kdab.com
* Fix build on MinGW due to missing includeIvan Donchevskii2017-10-271-0/+1
|
* Add flag to change build of ClangLazy from shared to staticIvan Donchevskii2017-10-233-2/+13
| | | | Differential Revision: https://phabricator.kde.org/D8377
* Protect CheckManager with mutexKevin Funk2017-10-224-1/+28
| | | | | Needed in case Clazy is used as a plugin inside libclang. There, we might have multiple threads accessing CheckManager concurrently.
* Minor cleanup to previous commit regarding visit-implicit-codeSergio Martins2017-10-192-2/+2
| | | | CCBUG: 385851
* Add option to visit implicit code, such as compiler generated CTORsRichard Oehlinger2017-10-195-1/+22
| | | | | | | | | Although clazy's built-in checks don't need this, some custom user checks might Not enabled by default as it causes a slight slowdown BUG: 385851
* Merge branch '1.2' into masterSergio Martins2017-10-191-1/+2
|\
| * Fix make install.upstream/1.2Richard Oehlinger2017-10-191-1/+2
| |
* | Merge branch '1.2'Sergio Martins2017-10-185-9/+26
|\|
| * Fix build with -DCLAZY_BUILD_UTILS_LIB=ONSergio Martins2017-10-181-2/+2
| | | | | | | | BUG: 385890
| * detaching-temporary: Don't warn for intersect, unite and subtractSergio Martins2017-10-152-4/+13
| | | | | | | | | | | | These are fine to be called on a temporary, since they return a reference to the object itself, which then must be stored or something done with it due to Q_REQUIRED_RESULT
| * detaching-temporary: Add a failing unit-testSergio Martins2017-10-152-2/+10
| | | | | | | | Not sure why this happens yet
| * Add missing \n in debug messageSergio Martins2017-10-151-1/+1
| |
* | Inform which is the second argument => number of argumentMontel Laurent2017-10-161-1/+1
| | | | | | | | | | | | | | | | + add space after this one. It avoids line as : error, invalid argIndex 3 3/compile/kde5/framework/kde/pim/kmail-account-wizard/src/cryptopage.cpp:226:9: warning: Pass 'this' as the 3rd connect parameter [-Wclazy-connect-3arg-lambda] => we have "3" without space so we can't copy path directly and we didn"t know when was the second "3"
* | Merge branch '1.2' into masterSergio Martins2017-10-1210-20/+40
|\|
| * rule-of-three: Don't warn for std:: typesSergio Martins2017-10-121-1/+1
| |