PKEuS
a9a5dc0354
Updated to AStyle 2.03, require this version
2013-08-07 16:27:37 +02:00
Daniel Marjamäki
9c67af058a
SymbolDatabase: Renamed Variable::varId() to Variable::declarationId() to make it more clear how it works.
2013-07-20 12:31:04 +02:00
Robert Reif
870d29944b
Fixed #4852 (false positive: Member variable 'A::sz' is not initialized in the constructor)
2013-06-14 06:32:26 +02:00
Daniel Marjamäki
1476787f40
CheckClass: Fixed nullpointer check and then dereference warning.
2013-05-17 14:10:53 +02: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
Frank Zingsheim
1935c544e0
Fixed #4656 (New check: Detect pure virtual function calls)
...
C++11: move constructor
2013-04-08 20:48:45 +02:00
Frank Zingsheim
47360f1191
Fixed #4656 (New check: Detect pure virtual function calls)
...
C++11: move constructor
2013-04-08 19:37:08 +02:00
Frank Zingsheim
5d55d40361
Fixed #4656 (New check: Detect pure virtual function calls)
2013-03-30 15:09:22 +01:00
PKEuS
ed477ceb74
Fixed false negative mentioned in #4354 .
2013-03-14 09:27:42 -07: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
9287e40e99
Incresed constness of several pointers in symboldatabase
2013-03-05 09:42:42 -08:00
PKEuS
a94598e447
Fixed some gcc and cppcheck messages
2013-03-05 07:07:59 -08:00
PKEuS
ca96aaa53b
Avoided unnecessary usage of symbolDatabase->isClassOrStruct()
2013-03-05 06:55:31 -08:00
PKEuS
7bc729bc63
- Moved more functionality from Scope to Type: BaseInfo and FriendInfo
...
- Replaced Scope->findQualifiedScope by SymbolDatabase::findScope
- Improved SymbolDatabase::findType
2013-03-05 06:28:40 -08: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
Daniel Marjamäki
b3a2b69120
fixed gcc warning
2013-03-04 19:28:27 +01:00
PKEuS
c24527dbde
Improved handling of dereferences in CheckClass::noMemset(), fixing false negatives and false positives related to multidimensional arrays and arrays of pointers.
2013-03-04 02:47:29 -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
9d195144ea
CheckClass: Fixed GCC warning
2013-03-02 07:30:55 +01:00
Robert Reif
ec7843e911
Fixed #4629 (False positive: warning (uninitMemberVar) - regression)
2013-03-02 07:24:51 +01:00
PKEuS
096aae4439
New check: Warn about using malloc() for classes containing virtual methods, std::-objects or constructors
2013-03-01 06:07:20 -08:00
PKEuS
0105f8223c
Simplified several Token::Match/simpleMatch calls when match string consists of a single pattern
...
Fixed two CheckInternal error messages
2013-03-01 03:42:04 -08: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
PKEuS
711d0d7a33
Warn about memset(this, 0, sizeof(*this)); ( #1285 )
2013-02-16 11:02:43 -08:00
PKEuS
b27a3c802c
Fixed travis failure: use begin() instead of C++11 cbegin()
2013-02-16 02:35:54 -08:00
PKEuS
d3087602a1
Fixed false positive "function can be const" if a non-const expression is inside []-brackets ( #4406 )
2013-02-16 02:20:18 -08:00
PKEuS
afe45ff39f
Refactorized CheckClass::privateFunctions:
...
- Resolved todo about nested classes, fixed false negative, fixed wrong unit test
- Removed slow and unnecessary Token::findmatch
- Removed false positive when function implementation in friend class is not seen (#4384 )
2013-02-16 01:51:08 -08: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
8e35860fc2
CheckClass: Refactoring. Use Token::variable(). Ticket: #4535
2013-02-02 16:30:17 +01:00
Robert Reif
859793731d
SymbolDatabase: Refactor findFunction handling. Ticket: #4494
2013-01-28 06:47:48 +01:00
Andrew C. Martin
4a73c93750
Fix compiler warnings and comment/string typos
...
- fix g++ warning:
> lib/checkother.cpp:3779: warning: comparison between signed and unsigned integer expressions
- fix suncc warning (see [everything2](http://everything2.com/title/C%252B%252B%253A+static+extern+%2522C%2522 )):
> "lib/checkmemoryleak.cpp", line 578: Warning (Anachronism): Formal argument __compar of type extern "C" int(*)(const void*,const void*) in call to bsearch(const void*, const void*, unsigned long, unsigned long, extern "C" int(*)(const void*,const void*)) is being passed int(*)(const void*,const void*).
- prefer empty() / isEmpty() over "size() > 0" (cases not caught by stlSize)
- fix word misspellings (mostly comments, a few output lines)
- Parenthesis => Parentheses (both variations were used in the codebase)
- fix typo and wording ("never alwayw") in gui/test/data/benchmark/simple.cpp's CheckOther::unsignedPositive():
```
- "An unsigned variable will never alwayw be positive so it is either pointless or "
+ "An unsigned variable can't be negative so it is either pointless or "
```
2013-01-16 07:37:07 -07:00
PKEuS
f5ebbff0a3
Fixed #4460 : Ensure that memset/memcpy is called on a pointer to a class instance.
2013-01-05 12:27:55 -08: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
Daniel Marjamäki
bf169e0c59
Replaced %name% with %type%
2012-12-31 10:45:37 +01:00
Robert Reif
07d118dee5
Fixed #4449 (segfault in CheckClass::initializeVarList())
2012-12-29 08:30:14 +01:00
Robert Reif
bd2f59bdf0
Fixed #4442 (crash of cppcheck while scanning gcc-testsuite (invalid code))
2012-12-28 08:36:20 +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
Robert Reif
5a7ede2563
Fixed #4391 (False positive: ctor not detected after variable declaration)
2012-12-10 06:01:29 +01:00
Daniel Marjamäki
1c4afbce8c
Cleanup: Removed += and -= patterns from the checks. These should be simplified.
2012-11-30 07:08:16 +01:00
PKEuS
b0c1c2c819
Don't suggest using initialization list for static variables ( #4332 )
2012-11-04 11:59:09 +01:00
Daniel Marjamäki
e1dce66494
tweaked message
2012-10-28 13:03:40 +01:00
Robert Reif
c7961b147d
speed up checks by caching commonly looked up stuff in the symbol database
2012-10-11 06:12:24 +02:00
Robert Reif
bbfd676b4e
speed up checks by caching commonly looked up stuff in the symbol database
2012-10-10 20:42:07 +02:00