Robert Reif
ca2e8b057b
fix #2947 (False positive: member variable is not initialized (a[x::y] = 0;))
2011-07-27 12:03:44 -04:00
Robert Reif
54141f2e7f
fix #2943 (Symbol database: Wrong parsing of std::vector as base class.)
2011-07-27 11:23:22 -04:00
Robert Reif
77859b9a0f
fix #2878 (derived global class not tokenized properly (class A : ::B { };))
2011-06-30 07:25:36 -04:00
Robert Reif
443dd4c392
partial fix for #2867 handle derived class
2011-06-29 19:39:19 -04:00
Robert Reif
f403de7bad
partial fix for #2867 Tokenizer::removeRedundantAssignment didn't understand function local class and removed class variable
2011-06-28 19:48:28 -04:00
Robert Reif
0f6da27b9f
fix #2795 (hash operator[] is not 'const') (original patch by Sebastien Debrard) (modified to use the symbol database)
2011-06-03 22:00:27 -04:00
Robert Reif
42316f3e0b
fix #2792 (false positive: Member variable 'class::m_val' is not assigned a value in 'class::operator=')
2011-05-24 20:25:34 -04:00
Robert Reif
bd03768415
move symbol database tests to testsymboldatabase.cpp
2011-04-28 21:03:57 -04:00
Robert Reif
6abf29bd22
fix spelling of initialized in checkclass messages
2011-04-26 20:37:16 -04:00
Greg Hewgill
3fc1db51d1
Change symbol database such that the typestart token skips over type modifiers (const/static/mutable).
...
This fixes checking for the case of a memset() on a static variable.
2011-04-23 01:13:23 +12:00
Daniel Marjamäki
061eab4d22
Virtual destructors: Enabled the check again. I think it is conclusive now. Ticket: #2728
2011-04-20 18:03:16 +02:00
Daniel Marjamäki
e5d43d4ed2
Renamed Settings::stupid to Settings::experimental
2011-04-10 15:55:08 +02:00
Daniel Marjamäki
30ee9ba6e4
Added Settings::stupid flag that can be used to hide checking that generates false positives.
2011-04-10 13:23:45 +02:00
Robert Reif
3c8644fcf8
added tests for #2710 (False negative on uninitialized member variable in a ctor.)
2011-04-08 07:39:30 -04:00
Robert Reif
cf65a73c47
fix CheckClass::operatorEq to check return type more closely (to match check description)
2011-03-31 19:40:28 -04:00
Robert Reif
1e1434e191
make member variable change detection simpler and more accurate for CheckClass::checkConst
2011-03-27 13:59:12 -04:00
Robert Reif
168db82fd6
better checking of assignment to array element in CheckClass::checkConstFunc
2011-03-25 23:02:13 -04:00
Robert Reif
f8e1735b0f
add support to CheckClass::checkConstFunc for ++/-- array elements
2011-03-25 22:37:32 -04:00
Robert Reif
6e6c86365f
add some missing ; at end of class and struct definitions in checkclass tests
2011-03-25 07:58:51 -04:00
Robert Reif
61e720c82b
fix #1288 (Use of memset on struct - nested structs not handled)
2011-03-23 21:58:58 -04:00
Robert Reif
7e3e5d628d
better fix for #2672 (False positive: function can be const, nested classes declared in one line)
2011-03-23 20:19:32 -04:00
Robert Reif
ac7f1f874e
add some more CheckClass::noMemset tests
2011-03-22 22:45:19 -04:00
Robert Reif
d36ed9aff1
fix #2670 (False positive: function can be const, overloaded functions)
2011-03-22 19:23:36 -04:00
Robert Reif
2277cb6965
fix #2663 (False negative: function can be const (changing unknown or uninitialised variable))
2011-03-20 13:29:52 -04:00
Robert Reif
41d80b5c8d
fix #2664 (False negative: function can be const (using type from another namespace))
2011-03-20 12:53:37 -04:00
Robert Reif
1de35c168d
fix #2657 (segmentation fault of cppcheck ( gcc-testsuite: return f(){} ))
2011-03-17 20:10:56 -04:00
Robert Reif
7e04ea0859
fix removal of throw() from const functions
2011-03-16 19:54:52 -04:00
Robert Reif
47531dd99c
fix #2637 (segmentation fault of cppcheck ( {} const const ))
2011-03-15 22:33:14 -04:00
Greg Hewgill
fa868e44ae
Support use of 'this->' when checking operator=() return type
2011-03-15 20:19:30 +13:00
Robert Reif
27f4b8b88b
Convert CheckClass::noMemset to use the symbol database to lookup types. This adds better support for namespaces and nested classes.
2011-03-12 22:41:21 -05:00
Greg Hewgill
1ec6a642dc
Revert "Check for memset on nested structs (ticket #1288 )"
...
Turns out this fix is incomplete.
This reverts commit a084697410
.
2011-03-10 20:19:31 +13:00
Greg Hewgill
a084697410
Check for memset on nested structs (ticket #1288 )
2011-03-09 23:02:49 +13:00
Greg Hewgill
3883afcbf4
Check for memset on objects with virtual functions (ticket #607 )
2011-03-09 22:10:39 +13:00
Greg Hewgill
70b4076111
refactor noMemset so it recursively checks parent classes for non-memset-compatible things
2011-03-09 21:29:30 +13:00
Robert Reif
f596a6959e
code cleanup and add more tests to CheckClass::noMemset()
2011-02-24 19:59:50 -05:00
Chuck Larson
db7ce1c13c
memset: using memset on struct/class that has std::string member variable. ticket: #1655
2011-02-24 18:38:45 +01:00
Robert Reif
5f84272a52
fix segfault: #2591 (cppcheck hangs with 100% cpu load ( class A : ))
2011-02-21 14:25:35 -05:00
Robert Reif
5984b6b53f
fix #2595 (False positive Technically the member function 'A::foo' can be const)
2011-02-20 20:01:54 -05:00
Robert Reif
fef1142997
fix #2592 (False positive: 'operator=' should return reference to self)
2011-02-19 20:02:16 -05:00
Robert Reif
e6eb160395
fix [B#2589 (segmentation fault of cppcheck (struct B : A))
2011-02-19 14:38:00 -05:00
Daniel Marjamäki
53aaf22633
CheckClass::noMemset: Added TODO test case
2011-02-16 21:31:35 +01:00
Robert Reif
2aefa5deb5
fix #2577 (segmentation fault of cppcheck)
2011-02-12 15:35:48 -05:00
Daniel Marjamäki
26f017e9c6
scripts: added tabs.pl - in my opinion it is bad to use tabs inside string constants. spaces or \t should be used instead.
2011-02-05 12:53:28 +01:00
Robert Reif
c592ccd35d
Fixed #2547 (segmentation fault of cppcheck)
2011-02-05 08:59:59 +01:00
Robert Reif
f87056fca3
Fixed #2539 (segmentation fault of cppcheck)
2011-02-04 20:19:49 +01:00
Robert Reif
8288c28b3f
Fixed #2537 (segmentation fault of cppcheck)
2011-02-03 07:57:10 +01:00
Pete Johns
098f0bf3e6
Fixed #2526 (Make TODO_ASSERT_EQUALS take three arguments (value, to_be, as_is)?...
...
Removed replaced EXPECTED with...
WANTED (to-be): The future expected value.
CURRENT (as-is): Documenting how cppcheck behaves now.
This removes the need for an ASSERT_EQUALS but enforces the check for every TODO_ASSERT_EQUALS.
2011-01-30 23:20:11 +11:00
Daniel Marjamäki
524498e439
Tokenizer: collapse operator function names into a single token. ticket: #2519
2011-01-27 18:44:20 +01:00
Robert Reif
767e01e24a
Fixed #2478 (Crash when trying to analyze files (CheckClass::checkReturnPtrThis))
2011-01-21 19:54:41 +01:00
Pete Johns
38c37ad2d8
Moved array declaration detection into isVariableDeclaration()
2011-01-17 08:36:52 +11:00