Daniel Marjamäki
59cc479855
Save bitfield bit counts
2018-05-02 20:55:11 +02:00
Daniel Marjamäki
7dfbe7389b
Clarify null pointer arithmetic message
2018-05-02 12:57:24 +02:00
Paul Fultz II
f191a3e753
Improve checking of opposite expressions ( #1199 )
...
* Improve checking of opposite expressions
* Fix some formatting
2018-05-02 06:32:33 +02:00
Daniel Marjamäki
b2343a2d4b
Fixed #8518 (Clarify warning for a NULL pointer which is received by a function call parameter.)
2018-05-01 17:30:29 +02:00
Daniel Marjamäki
31148fdfed
Fixed #8523 (Clarify warning: noConstructor)
2018-05-01 15:50:03 +02:00
Daniel Marjamäki
40b6f6b3dd
CheckClass: Fix the noDestructor warning
2018-05-01 15:31:13 +02:00
Daniel Marjamäki
9710e819be
CheckClass: Disable noDestructor for now, we need to handle new better
2018-05-01 09:26:03 +02:00
Daniel Marjamäki
42100fdf11
CheckClass: Better handling of non-copyable classes in the noCopyConstructor check
2018-05-01 08:33:23 +02:00
Sebastian
b370861bed
test/cfg/std.c: Cleaning up function names and redundant tests ( #1198 )
...
Make the names of uninitvar_* functions consistent and fix typos.
Remove completely redundant functions/tests. Combine according tests if
they are not completely redundant.
2018-05-01 07:33:43 +02:00
IOBYTE
c3c1abd05e
SymbolDatabase: improve checking of uninstantiated templates ( #1196 )
...
* SymbolDatabase: improve checking of uninstantiated templates
* Add bailout and debug warning for '>' token without a link in SymbolDatabase::findFunction()..
Don't crash on bad code simplification from tokenizer.
2018-05-01 07:32:19 +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
7015fb097e
SymbolDatabase::isFunction: better handling of return types
2018-04-29 15:35:31 +02:00
Paul Fultz II
e571e598b6
Fix false positive with inner conditions when using pointers ( #1195 )
2018-04-28 18:56:13 +02:00
Daniel Marjamäki
ca8e19c96d
SymbolDatabase: Refactor SymbolDatabase: variable list
2018-04-28 09:38:33 +02:00
Sebastian
6208ee4af1
std.cfg: Add asctime_s function configuration with tests ( #1191 )
...
* std.cfg: Add asctime_s function configuration with tests
* std.cfg: Remove redundant/not needed not-bool attributes.
2018-04-27 23:51:16 +02:00
Daniel Marjamäki
1a9e8c158d
CheckClass::copyconstructors: Use library to determine if function is a allocation function
2018-04-27 23:20:04 +02:00
Daniel Marjamäki
f336c2efe7
Refactoring; Renamed Scope::classStart and Scope::classEnd
2018-04-27 22:36:30 +02:00
Daniel Marjamäki
e6a37ec0b7
Fixed #8531 (false positive: (style) The function 'foo' overrides a function in a base class but is not marked with a 'override' specifier.)
2018-04-27 21:49:18 +02:00
Daniel Marjamäki
25599a76a7
Handle 'final' specifier better.
2018-04-27 14:57:43 +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
8304290f06
astyle formatting
...
[ci skip]
2018-04-27 10:29:27 +02:00
Daniel Marjamäki
d15b945c9e
SymbolDatabase::isFunction: Fix wrong detection function
2018-04-27 10:24:02 +02:00
Simon Martin
9fade65dbb
Ticket #8281 , #8417 : Properly detect the end of "switch" statements to accept all legitimate uses of "case". ( #1112 )
2018-04-26 22:26:26 +02:00
Daniel Marjamäki
5384802e16
SymbolDatabase: Look for types in anonymous scopes
2018-04-26 17:55:04 +02:00
amai2012
55983e2a0b
#8509 Uniform initialization ignored for iterator
2018-04-26 08:57:25 +02:00
Sebastian
038064436d
std.cfg: Fix minsize configuration for vsprintf ( #1188 )
...
minsize with argvalue for arg 2 which is a char pointer makes no sense.
Changing it to minsize with strlen for arg 2 results in false positives
(and i think false negatives too).
In std.c a test with a valid vsprintf usage is added that would result
in a FP when minsize with strlen for arg 2 would be used.
2018-04-25 02:52:19 +02:00
IOBYTE
fac851192a
SymbolDatabase: fix problem where definition coudn't find forward declaration in class ( #1190 )
2018-04-24 22:43:47 +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
485d3e0229
CheckClass: Tweak rule of 3 checker
2018-04-24 21:45:30 +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
8310198cd5
SymbolDatabase: Refactoring and testing isImplicitlyVirtual
2018-04-24 13:53:58 +02:00
Daniel Marjamäki
bb227613bb
SymbolDatabase: Better type lookup in methods
2018-04-23 22:27:15 +02:00
Sebastian
a61f9abbb7
Visual Studio: testrunner: Add missing testastutils ( #1186 )
2018-04-23 20:03:06 +02:00
orbitcowboy
92fd0595b1
Merge branch 'master' of https://www.github.com/danmar/cppcheck
2018-04-23 12:55:10 +02:00
orbitcowboy
e76f1e70e8
Added tests for invalidFunctionArg.
2018-04-23 12:54:49 +02:00
Daniel Marjamäki
7c5058a42d
Refactoring. Rename methods
2018-04-23 12:39:47 +02:00
Daniel Marjamäki
f058d9ad08
CLI: Added more fields for --template and added a new --template-location. The gcc predefined template now matches latest gcc better.
2018-04-23 12:21:18 +02:00
Daniel Marjamäki
e1db4c0e2c
astyle formatting
...
[ci skip]
2018-04-21 13:28:31 +02:00
Simon Martin
a451a5b598
Ticket #8436 : Handle C++11 initializations within ternary operator. ( #1174 )
2018-04-21 11:30:07 +02:00
Paul Fultz II
d939c6015a
Report opposite expressions ( #1182 )
...
* Report opposite expressions
* Skip assignment operator
2018-04-21 11:28:21 +02:00
Paul Fultz II
bad66594d6
Fix double free regression with smart pointers ( #1184 )
2018-04-21 11:24:19 +02:00
Daniel Marjamäki
d5fb529d4f
Fixed #8492 (Improve message: parameter should be passed by reference)
2018-04-20 17:33:42 +02:00
Sebastian
b53c4b2032
std.cfg: Add std::vector function configurations and tests ( #1180 )
2018-04-19 16:41:25 +02:00
amai2012
e256ce8ea8
Add more tests for Path::isAbsolute
2018-04-19 14:35:26 +02:00
Daniel Marjamäki
7ee636b934
Refactoring: Reuse isLikelyStreamRead in isVariableChanged
2018-04-18 17:46:10 +02:00
Daniel Marjamäki
26e36a1d6b
Fix FP uninitvar when stream bool operator is used
2018-04-18 16:13:24 +02:00
Sebastian
3b68c913cb
testrunner: Add testplatform to verify platform loading ( #1176 )
2018-04-18 16:12:35 +02:00
Daniel Marjamäki
1b4f4d7130
Fixed #8495 (False positive: boolean result used in bitwise operation when & is overloaded)
2018-04-17 22:14:17 +02:00
Daniel Marjamäki
c84628c28a
Fixed #8494 (False positive: serialization class overloads operator)
2018-04-17 14:23:04 +02:00
Daniel Marjamäki
a4f8c44432
astyle formatting
...
[ci skip]
2018-04-16 12:55:37 +02:00