Commit Graph

101 Commits

Author SHA1 Message Date
PKEuS 8e4f99884b Removed more duplicate unit tests 2013-04-13 00:49:00 -07:00
Frank Zingsheim 54e7c8f6a2 Implemented support for move constructors:
Adapt code to Function::eMoveConstructor
introduced in commit eb2962792f
2013-04-10 21:57:22 +02:00
Ettl Martin 1b9c1c03fa unittests: removed not needed '\n' at the end of testcases. 2013-03-20 15:36:16 +01:00
Ettl Martin 54d398c7dd unittests: removed not needed '\n' at the end of testcases. 2013-03-19 09:18:58 +01:00
Robert Reif 25c36b56fa CheckClass: made warnings about uninitialized members in default constructors inconclusive. Ticket: #4639 2013-03-09 09:20:48 +01:00
PKEuS 66a3555897 Implement initial support for Types in Symboldatabase:
- For each class/struct/union, a Type instance is added to SymbolDatabase::typeList.
- A scope is no longer created for declared but not defined types

Fixed name detection for classes when they are declared like this: "class ::Foo::Sub {..."
2013-03-05 04:33:38 -08:00
PKEuS d78c06dc3f Replaced _settings->isEnabled("style") by _settings->isEnabled("warning") wherever warnings are issued 2013-03-03 02:41:59 -08:00
Daniel Marjamäki 94da3bd57f Fixed #4617 (False positive (style): noexcept for constructors) 2013-02-28 06:38:57 +01:00
Robert Reif 509061afff Fixed #4620 (False positive: Uninitialized variable in constructor (1.58)) 2013-02-27 06:59:04 +01:00
Robert Reif e6915e7a78 Fixed #4536 (non-static member initializer causes false positive) 2013-02-18 06:33:53 +01:00
Robert Reif c5ee083c82 Fixed #4388 (false positive 'noConstructor' in 1.57) 2013-02-15 06:44:07 +01:00
Robert Reif 5de26bfeb9 Fixed #4574 (noConstructor false positives introduced in cppcheck 1.58) 2013-02-13 06:00:04 +01:00
Robert Reif fe5de60f32 Fixed #4567 (false negative: The class 'B' does not have a constructor.) 2013-02-08 06:55:45 +01:00
Robert Reif 1a58ae4994 Symbol database: handle when forward declaration doesn't match declaration. Ticket: #4531 2013-02-01 06:31:02 +01:00
Robert Reif d37906041b Fixed #4458 (False positive: noCopyConstructor in template class) 2013-01-04 10:35:24 +01:00
Daniel Marjamäki 6e58ed3040 Fixed #4454 (False positive: class member (POD) not initialized (when initialized to 0 in initializer list)) 2013-01-02 13:59:57 +01:00
Reijo Tomperi 5d5f7085bf Updating year 2012 -> 2013 to .cpp and .h files and man page. 2013-01-01 18:29:08 +02:00
Robert Reif d2e8ab9c86 Fixed #4302 (Member variable not initialized in public delegate constructor) 2013-01-01 09:53:40 +01:00
Robert Reif 07d118dee5 Fixed #4449 (segfault in CheckClass::initializeVarList()) 2012-12-29 08:30:14 +01:00
Robert Reif a43ae677d7 Fixed #4419 (False positive: Class does not have a constructor) 2012-12-27 17:21:30 +01:00
Daniel Marjamäki b39afb2cf9 Revert "Fixed #4419 (False positive: Class does not have a constructor)"
This reverts commit 9a79961b6c.

There is a segmentation fault when checking lib/preprocessor.cpp
2012-12-24 07:46:55 +01:00
Robert Reif 9a79961b6c Fixed #4419 (False positive: Class does not have a constructor) 2012-12-24 06:46:30 +01:00
Robert Reif 80848c6e0e Fixed #4383 (Improve check: uninitialized member variable not detected when initialization is not proper) 2012-12-21 19:36:45 +01:00
PKEuS 4737966caf Unit test cleanup: Removed some empty lines and whitespaces before \n. 2012-12-06 10:19:22 -08:00
Robert Reif 35c2b8058d Fixed #3190 (SymbolDatabase: Parse of sub class constructor fails) 2012-11-30 06:03:58 +01:00
PKEuS 36aeb74b5a Fixed string literals in several unit tests (one test failing - changed it to TODO) 2012-11-29 21:07:52 +01:00
Robert Reif bbc1747919 Fixed #3702 (False negative: fail to detect constructor implementation with slightly different (irrelevant) signatures) 2012-11-26 16:34:44 +01:00
Daniel Marjamäki b591097c87 Revert "Fixed #3190 (SymbolDatabase: Parse of sub class constructor fails)"
This reverts commit 1ee980184e.
2012-10-16 19:12:27 +02:00
Robert Reif 1ee980184e Fixed #3190 (SymbolDatabase: Parse of sub class constructor fails) 2012-10-16 06:11:28 +02:00
Daniel Marjamäki 2f069f550f Removed Java/C# handling 2012-10-02 18:44:36 +02:00
Daniel Marjamäki 990340ba98 Fixed #4072 (False positive: Structure is not initialized in the constructor (1.55)) 2012-09-23 18:29:05 +02:00
Daniel Marjamäki 37695d44f3 Fixed #4085 (tinyxml2 false positives) 2012-09-22 16:49:28 +02:00
Daniel Marjamäki 6d928a2ff7 Fixed #4119 (false positive with operator= when implemented in terms of swap) 2012-09-22 08:50:36 +02:00
Daniel Marjamäki a65f427195 Fixed #3836 (False positive: variable not initialized in copy constructor/operator (attached example code) 2012-09-22 08:16:16 +02:00
Daniel Marjamäki de8e592d00 Class: Show inconclusive warnings about unknown types that are not initialized in copy constructors. Ticket: #3611 2012-09-20 19:16:26 +02:00
Daniel Marjamäki 7d3e661774 Fixed #3611 (CheckClass: uninitVar and operatorEqVarError false positives (non-copyable members)) 2012-09-20 16:47:01 +02:00
Daniel Marjamäki a96ec0ad46 Fixed #3804 (False positive: Member not initialized (simplifyTokenList removes const on pointers)) 2012-07-16 07:28:59 +02:00
PKEuS 37d9d6fd7e Improved parsing of C++11 initializer list (#3956) in CheckClass::initializeVarList. 2012-07-10 05:47:51 -07:00
PKEuS 639f15645a Message refactorization: checkbufferoverrun.cpp (2), checkclass.cpp, checkexceptionsafety.h 2012-07-09 02:11:05 -07:00
PKEuS 43c060b630 Removed preprocessor directives from tests that aren't preprocessed before being tokenized. 2012-07-07 11:21:08 -07:00
PKEuS f3f46b4861 Fixed #3820 2012-05-22 02:27:21 -07:00
PKEuS 4871cef351 Refactorized test cases for uninitMemberVar check:
- Moved all test cases to a single file (testconstructors.cpp)
- Removed some redundant test cases that became unnecessary after the symbolDatabase was established as independant from this check
2012-05-15 02:36:27 -07:00
Reijo Tomperi 8cae17fda8 Update year to 2012 2012-01-01 01:05:37 +02:00
Daniel Marjamäki 1b1fd9d39c Fixed #3196 (False positive: member variable not initialized in constructor (union)) 2011-11-22 19:26:00 +01:00
Daniel Marjamäki af7bf5c805 removed 'explicit constructors' check. see comments in pull request #51 for the reasons. 2011-11-02 17:12:46 +01:00
Daniel Marjamäki 7035d4cdd2 astyle formatting 2011-10-30 17:41:05 +01:00
Richard Quirk 2ca932a3ae Add checks for explicit constructors
Single-argument constructors should be explicit. Constructors with
multiple arguments should not be marked explicit.
2011-10-29 18:24:16 +02:00
Richard Quirk b88d61dcb4 Make single-argument test constructors explicit 2011-10-29 18:17:25 +02:00
Daniel Marjamäki 6f8e42a5af changed the astyle formatting flags 2011-10-13 20:53:06 +02:00
Kimmo Varis cfcfa3f000 Use "enabled" list for the style checking.
Settings-class currently enables style checking via dedicated
boolean attribute. All other CLI's enable-options are handled
through the enable-list. This commit moves style-check enabling
to use the enable-list.

Main advantage is the consistency how options are handled/stored
in the Settings class. Which also unifies using them for the other
code. You need to enable certain type of checks? Use the
addEnabled()-method. You want to check if certain type of checks
are enabled? Use the isEnabled()-method.
2011-08-07 10:28:52 +03:00