Commit Graph

184 Commits

Author SHA1 Message Date
Daniel Marjamäki 8b5f36670a Introduce macro OVERRIDE for gcc-4.6 compatibility. 2019-01-12 07:37:42 +01:00
amai2012 af639e9848
#7772 Add uninitMemberVarPrivate to errorlist (#1557) 2019-01-02 18:08:39 +01:00
Daniel Marjamäki 738fb1b23a Disabled CheckClass::checkCopyCtorAndEqOperator because of FP (#8388) 2018-09-08 09:14:02 +02:00
Daniel Marjamäki 4d78a2e178 Fixed #7790 (Wrong order of <location> XML-elements for error duplInheritedMember) 2018-08-19 14:13:58 +02:00
Daniel Marjamäki e90c04cff9 Rename private member variable 2018-06-17 18:43:54 +02:00
Daniel Marjamäki 45379a3aa6 Updated copyright year for modified files
[ci skip]
2018-06-10 22:07:21 +02:00
IOBYTE ce50df8047 Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
Daniel Marjamäki 64b85b474c Fixed #8542 (False positive: noOperatorEq) 2018-05-05 07:46:58 +02:00
Daniel Marjamäki 7fb28b05f6 Check Class: Try to clarify the warnings for noCopyConstructor/noOperatorEq/noDestructor. 2018-05-04 15:39:23 +02:00
Daniel Marjamäki 40b6f6b3dd CheckClass: Fix the noDestructor warning 2018-05-01 15:31:13 +02:00
Daniel Marjamäki 73b41455dd CheckClass: If class has memory management it should have copy constructor, operator= and destructor 2018-04-30 23:13:33 +02:00
Daniel Marjamäki b830f462e6 Added missingOverride checker; Function 'f' overrides function in base class but does not have the 'override' keyword. 2018-04-27 11:12:09 +02:00
Daniel Marjamäki deaafd59d7 CheckClass: Undo the rule of 3 checker to avoid some warnings 2018-04-24 22:42:25 +02:00
Daniel Marjamäki 6fb25dcaa4 CheckClass: Changed checker for 'copy constructor' and 'operator=' to a 'rule of 3' checker 2018-04-24 16:07:58 +02:00
Daniel Marjamäki 1046ca2120 Improve check: Warn about virtual function calls in constructor/destructor 2018-04-02 15:31:47 +02:00
Daniel Marjamäki e492932f19 Improve check: Variable is not initialized in private constructor (C++11 or later) 2018-04-02 15:26:15 +02:00
Daniel Marjamäki c4caee6b18 Updated copyright year 2018-01-14 15:37:52 +01:00
Daniel Marjamäki 5de3c43209 changed id for new checker to unsafeClassDivZero 2017-10-21 21:45:04 +02:00
Daniel Marjamäki 15d814e609 classPublicInterfaceDivZero: Try to make the error message a bit better. Added variable name and what the bad input value is. 2017-10-21 13:00:52 +02:00
Daniel Marjamäki 86c84029e3 New check: Check public interface of classes (#8248) 2017-10-20 02:02:51 +02:00
Ayaz Salikhov b8cd7dbb5c Use nullptr instead of 0 or NULL (#936) 2017-08-09 20:00:26 +02:00
Ayaz Salikhov 28aa939d69 iwyu - include what you use 2017-05-27 04:33:47 +02:00
Alexander Alekseev abba762d42 New check: checking for copy ctor and eq operator co-existence 2017-03-24 12:00:20 +01:00
PKEuS 2f0db369f0 Refactorization: Avoid construction of empty strings by using emptyString 2017-03-01 10:50:50 +01:00
amai2012 eba1b0881d Minor refactoring: use nullptr (instead of 0/NULL), change signature of Tokenizer::createTokens 2016-05-07 16:30:54 +02:00
Lauri Nurmi 996c9244d8 Update copyright year to 2007-2016. 2016-01-01 15:34:45 +02:00
Dmitry-Me 7fdbd8f0ca Use set instead of list 2015-12-25 16:19:27 +03:00
Alexander Mai d4749c3377 Fix excessive left shift of signed integer and some doxygen errors 2015-11-27 19:32:28 +01:00
Daniel Marjamäki 0f9d90d2be Changed Copyrights. Removed my name. 2015-11-18 20:04:50 +01:00
PKEuS 41fbc5355d Revert "Partially reverted 5cd36d6f8a for upcoming release."
This reverts commit 5f8a8aba6d.
2015-11-15 10:04:27 +01:00
PKEuS 5f8a8aba6d Partially reverted 5cd36d6f8a for upcoming release. 2015-11-14 18:53:49 +01:00
Daniel Marjamäki b10110b5ac CheckClass: Removed noExplicitCopyMoveConstructorError after discussion in http://sourceforge.net/p/cppcheck/discussion/general/thread/b2ce9d3d/. 2015-11-13 12:48:26 +01:00
PKEuS 5cd36d6f8a Refactorization: Use varid instead of variable name in CheckClass::initializeVarList() and fixed issue in setVarId().
Fixed internal warning.
2015-11-09 23:00:14 +01:00
Daniel Marjamäki ad6db2ba81 Reverted 105de8e917, new checker had FPs that need to be fixed. 2015-04-25 15:35:31 +02:00
Gustav Palmqvist 105de8e917 #220 uninitialized variable: using variable in ctor before it has been initialized. Implement new check usageBeforeInitialization 2015-04-07 22:01:13 +02:00
Jakub Melka e1e1dbfe97 Ticket #695: Fixed VS 2010 issue, switched to "style" severity, changed error messages and updated unit tests 2015-03-10 19:35:12 +01:00
Jakub Melka 2af9212b16 Ticket #695: new style check : explicit declaration of ctor 2015-03-07 20:07:54 +01:00
Dmitry-Me c79bfdce2c CheckClass: Better checking of what operator= returns 2015-01-24 11:18:33 +01:00
Daniel Marjamäki ff11ba9847 Updated copyright year to 2015 2015-01-03 12:14:58 +01:00
Daniel Marjamäki 051d42ae6b astyle formatting 2014-11-20 14:20:09 +01:00
orbitcowboy f5d804f71a running astyle 2014-11-20 10:13:03 +01:00
orbitcowboy 5a4526e997 Fixed typos in comments, no functional changes. 2014-10-02 04:39:41 +02:00
Daniel Marjamäki fbc6323a9b doc: changed --doc output to Markdown syntax 2014-09-30 14:56:12 +02:00
PKEuS f01d7543f6 #6077: Don't warn about memcpy/memmove on class containing floats. 2014-08-20 15:12:53 +02:00
PKEuS c4635cf698 Improved check: portability message when calling memset on a class with floating point numbers (#5421) 2014-08-08 09:49:09 +02:00
PKEuS e4b55cf843 Fixed a bug and two warnings introduced recently. 2014-08-06 13:35:39 +02:00
PKEuS 804e055eee New check: initialization by itself in initializer list (#3982)
Refactorizations:
- Rearranged code in checkclass.cpp to increase readability
- Several fixes for testclass.cpp tests.
2014-08-05 11:50:08 +02:00
Dmitry-Me a4d597451b Resolve CID 1214637. 2014-07-24 16:54:20 +04:00
Robert Reif 1f09cb0c30 Fixed #5807 (non virtual dtor in virtual class) 2014-06-14 12:55:20 +02:00
PKEuS 8f79dc3ff8 Cleaned up includes and forward declarations in checkers:
- Removed definitely unnecessary forward declarations (e.g. "class Token"; token.h is already included by check.h, so a definition is unnecessary)
 - Removed unused includes
2014-05-24 12:50:03 +02:00