Daniel Marjamäki
3b57273ef1
Fix Cppcheck warnings
2016-11-14 07:21:10 +01:00
Daniel Marjamäki
1e31c6c01c
ValueFlow: Extended handling of float values
2016-11-14 06:42:52 +01:00
Daniel Marjamäki
e1e9eacccc
ValueFlow: Added float type
2016-11-13 22:59:56 +01:00
Daniel Marjamäki
4732667488
ValueFlow: allow more value types
2016-11-13 22:33:39 +01:00
Daniel Marjamäki
7ebfb10edd
Fixed #7806 (ValueFlow: better handling of subfunction with early return)
2016-11-13 18:19:51 +01:00
Daniel Marjamäki
ee56fbe3a1
Fixed #7791 (Cppcheck does not expand Visual Studio macros)
2016-11-13 12:16:09 +01:00
Daniel Marjamäki
621c1e59c6
--project: handle SolutionDir and ProjectDir. This is a partial fix for #7791 . custom build macros are still not handled.
2016-11-11 16:22:14 +01:00
Daniel Marjamäki
b04f6fb359
bump simplecpp to rev d1c995c03515d289c7aa7246a74d666fd012c4eb
2016-11-10 20:04:05 +01:00
orbitcowboy
a4acfaa230
std.cfg: Added more <valid>-tags.
2016-11-08 09:36:24 +01:00
orbitcowboy
07aaf9999b
std.cfg: Merged identical configurations. There are no functional changes.
2016-11-08 09:08:04 +01:00
orbitcowboy
e3a9899983
std.cfg: Added <returnValue> support for wcslen().
2016-11-08 09:05:17 +01:00
Daniel Marjamäki
4de5dc75aa
Fixed #7807 (false positive: (error) Signed integer overflow for expression 'int32_max-1'.)
2016-11-07 22:29:40 +01:00
Daniel Marjamäki
1245f1d621
Unused Functions: Fix checking when --cppcheck-build-dir is used.
2016-11-07 21:49:58 +01:00
orbitcowboy
d361ca7b61
std.cfg: Improved support for <returnValue> for functions like isalpha() etc.
2016-11-07 11:01:19 +01:00
orbitcowboy
0b643a2429
std.cfg: Use XML-CDATA sections to avoid usage of escape characters in <returnValue>-tags.
2016-11-07 09:43:42 +01:00
Daniel Marjamäki
684e78f54e
synthetic test: fix compiler errors
2016-11-07 09:30:17 +01:00
Daniel Marjamäki
ea087e6188
synthetic test: renamed tests. tweak report.
2016-11-07 08:48:38 +01:00
Daniel Marjamäki
ac7b351d1e
ValueFlow: Don't calculate x<<64 and x>>64
2016-11-06 20:40:58 +01:00
Daniel Marjamäki
dd69d5eabe
ValueFlow: Don't calculate result when there is UB
2016-11-06 17:42:01 +01:00
Daniel Marjamäki
483fd8682a
cleanup redundant info in comment. ticket numbers can be looked up with git blame. if the code says there is a syntax error then a comment that says 'invalid code' isn't much clarification.
2016-11-06 16:49:25 +01:00
Alexander Mai
ee11f0974a
#7769 segmentation fault at setTokenValue() on invalid code.
2016-11-06 14:20:58 +01:00
Daniel Marjamäki
87b08fd405
bump simplecpp to rev a6124eec2bdab9eb6c06c87e024a94709ce6e9ee
2016-11-06 12:29:13 +01:00
Daniel Marjamäki
b607e83648
Try to fix travis
2016-11-05 21:45:31 +01:00
Daniel Marjamäki
350e5a7142
UnusedFunctions: Perform checking using analyzeinfo
2016-11-05 21:26:56 +01:00
Daniel Marjamäki
da956a5278
Merge pull request #844 from zingsheim/Fix7789MissingErrorMessages
...
Fix #7789 (Missing error messages in repeated check on compile_comman…
2016-11-05 21:00:18 +01:00
Frank Zingsheim
19706b3464
Fix #7789 (Missing error messages in repeated check on compile_commands.json in cppcheck-gui)
2016-11-05 20:14:01 +01:00
Daniel Marjamäki
0ddd82d1d5
test/synthetic: added pointer alias test case. renamed functions.
2016-11-05 16:56:30 +01:00
Daniel Marjamäki
ece4b1a06f
Fix ValueFlow
2016-11-05 09:59:48 +01:00
Daniel Marjamäki
f280061ff8
signed int overflow: warn about intmax+1
2016-11-05 09:29:52 +01:00
Daniel Marjamäki
2885a75ea6
ValueFlow: handle ~ in setTokenValue
2016-11-05 09:29:22 +01:00
Daniel Marjamäki
40bf269ea0
Add report.py that generates report for synthetic tests
2016-11-04 22:16:46 +01:00
Daniel Marjamäki
f5046959b3
minor updates in synthetic tests
2016-11-04 22:15:41 +01:00
Daniel Marjamäki
8e8194ee0f
try to make synthetic tests more explicit
2016-11-04 19:32:42 +01:00
Matthias Krüger
13bfe873f6
resolve mismatching tag reported by clang4.0-dev
...
was:
In file included from lib/checkunusedfunctions.cpp:21:
lib/checkunusedfunctions.h:114:15: warning: struct 'FunctionDecl' was previously declared as a class [-Wmismatched-tags]
std::list<struct FunctionDecl> _functionDecl;
^
lib/checkunusedfunctions.h:108:23: note: previous use is here
class CPPCHECKLIB FunctionDecl {
^
lib/checkunusedfunctions.h:114:15: note: did you mean class here?
std::list<struct FunctionDecl> _functionDecl;
^~~~~~
class
1 warning generated.
2016-11-04 15:51:36 +01:00
orbitcowboy
919f8ac323
Fixed typos. There are no real changes.
2016-11-04 15:01:05 +01:00
orbitcowboy
ed453d24da
std.cfg: Added returnValue support for iswdigit().
2016-11-04 14:20:59 +01:00
orbitcowboy
75124317e9
std.cfg: Added returnValue support for iswblank().
2016-11-04 14:03:48 +01:00
Daniel Marjamäki
469ca6af1b
Add synthetic ub tests
2016-11-03 21:45:33 +01:00
Daniel Marjamäki
6e9346323c
tweak synthetic tests
2016-11-03 20:16:49 +01:00
Daniel Marjamäki
506d1ed68d
synthetic tests: add ub.c
2016-11-03 14:51:18 +01:00
Daniel Marjamäki
0836b999cf
update synthetic tests. removed uninit.c because there was not enough diversity. my goal is to have few tests with much diversity.
2016-11-03 09:40:22 +01:00
Matthias Krüger
c6c17c89c9
synthetic tests: add "make clean", make CC settable via env flags.
2016-11-02 19:02:10 +01:00
Daniel Marjamäki
ad6c82b2ca
Added Makefile to compile synthetic tests
2016-11-02 13:57:29 +01:00
Daniel Marjamäki
50d6a23f93
test/synthetic/uninit.c : add more tests
2016-11-02 12:35:08 +01:00
Daniel Marjamäki
73d87856ce
Travis: don't check that there are no errors in the synthetic tests
2016-11-02 12:16:41 +01:00
Daniel Marjamäki
ca19861aaa
Add some synthetic tests
2016-11-02 11:07:04 +01:00
Daniel Marjamäki
18f466a880
Test std::for_each
2016-11-02 10:01:56 +01:00
Daniel Marjamäki
fd67bbf2d3
Test std::count and std::count_if
2016-11-02 09:57:35 +01:00
Daniel Marjamäki
12319d705e
Try to fix 'make checkcfg'
2016-11-02 09:50:37 +01:00
Daniel Marjamäki
b90a17f64f
Test std::all_of, std::any_of, std::none_of
2016-11-02 09:29:15 +01:00