Oliver Stöneberg
e0e50139cb
cleaned up includes based on include-what-you-use ( #2632 )
...
* cleaned up includes based on include-what-you-use
* token.cpp: fixed -Wextra-semi-stmt warning
2020-05-10 16:45:45 +02:00
Daniel Marjamäki
dc32f428ff
Set Cppcheck version
2020-05-10 11:28:31 +02:00
Daniel Marjamäki
08ddd84780
Update copyright year
2020-05-10 11:16:32 +02:00
Daniel Marjamäki
3e0218299b
Revert "Update copyright year"
...
This reverts commit 6eec6c4bd5
.
2020-05-10 11:13:05 +02:00
Daniel Marjamäki
6eec6c4bd5
Update copyright year
2020-05-10 11:11:34 +02:00
Daniel Marjamäki
137f262300
Fix Token::isImpossibleIntValue
2020-05-09 10:30:19 +02:00
Daniel Marjamäki
d4169f04d5
Bug hunting; Avoid false warnings for impossible values
2020-05-08 17:42:56 +02:00
Daniel Marjamäki
ab8bf81f03
ValueFlow: Try to clarify debug output for impossible values
2020-05-08 16:13:55 +02:00
Daniel Marjamäki
02d88cb191
Travis: Run TestExprEngine tests
2020-05-08 12:21:22 +02:00
Daniel Marjamäki
4779cb124e
Fixed #9649 (False positive: uninitialized struct member)
2020-05-07 22:27:18 +02:00
Daniel Marjamäki
00d1091506
Tokenizer: operator handling, fix tests
2020-05-04 23:00:51 +02:00
Daniel Marjamäki
06cb0e99d1
Tokenizer: Fix syntax error when operator* is called
2020-05-04 21:33:30 +02:00
Daniel Marjamäki
8c57055a0b
Try to make Travis happy
2020-05-03 20:46:29 +02:00
Daniel Marjamäki
b5094f298a
Bug hunting; Add new 'incomplete' flag for error messages. Used when analysis is incomplete.
2020-05-03 17:20:38 +02:00
Daniel Marjamäki
4c63940902
Add bug hunting test case for CVE-2019-7156
2020-05-02 22:22:31 +02:00
Daniel Marjamäki
5eeeba97eb
SymbolDatabase: Better handling of function pointer function argument
2020-05-02 17:04:54 +02:00
Daniel Marjamäki
56abbc1d42
Fixed segmentation faults
2020-05-01 18:10:18 +02:00
Daniel Marjamäki
34572a40ab
Bug hunting: Fixed handling of switch 'case %char%'
2020-05-01 15:15:24 +02:00
Daniel Marjamäki
999ef06156
ExprEngine: Try to handle function with unknown type better
2020-04-30 22:10:30 +02:00
Daniel Marjamäki
b27fabaacb
Refactoring ExprEngine
2020-04-30 21:49:27 +02:00
Daniel Marjamäki
b97250e0fa
ExprEngine; Try to handle assignments better
2020-04-30 21:05:34 +02:00
Daniel Marjamäki
5a9e81897a
ExprEngine: Document how it works
2020-04-30 12:18:49 +02:00
Daniel Marjamäki
e30eabc896
ExprEngine: Fail to execute contract => write error message
2020-04-29 18:30:12 +02:00
Daniel Marjamäki
daea5e2d6c
Bug hunting: Do not warn about 'Division by zero' when variable is uninitialized
2020-04-29 11:00:33 +02:00
Daniel Marjamäki
5d67fd0e56
Bug hunting: Set 'inconclusive' flag for bailout values
2020-04-29 10:58:01 +02:00
Daniel Marjamäki
3eb19a64cb
Removed inline suppression, it was not a FP, use #ifdef differently
2020-04-28 22:29:16 +02:00
Daniel Marjamäki
13e79fdeb6
Temporary inline suppression to hide false positive
2020-04-28 22:21:07 +02:00
Daniel Marjamäki
249a101ec2
Travis: Fix naming
2020-04-28 22:18:02 +02:00
Daniel Marjamäki
12dfd8a5ca
GUI: Show missing/added contracts in tab
2020-04-28 22:09:01 +02:00
Daniel Marjamäki
dab8b9fd31
ExprEngine: Improved checking of contracts in function calls
2020-04-28 17:16:13 +02:00
Daniel Marjamäki
c19a9c2ad9
GUI: Only edit contract for non-bailout warnings
2020-04-27 19:43:38 +02:00
Daniel Marjamäki
2e369cc842
astyle formatting
...
[ci skip]
2020-04-27 17:35:52 +02:00
Lionel Gimbert
ad6be7b122
Enforcing CppCoreGuideline C.35 on virtual class destructor ( #2572 )
...
* Enforcing CppCoreGuideline C.35
A base class destructor should be either public and virtual, or protected and non-virtual
https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rc-dtor-virtual
* Protected destructor of ciurtual class can be virtual
2020-04-27 09:22:42 +02:00
Daniel Marjamäki
f7096a2232
Bug hunting: basic handling of contracts through GUI
2020-04-27 09:08:50 +02:00
Daniel Marjamäki
72e0a4be29
Fixed initializerList warning
2020-04-26 15:24:25 +02:00
Daniel Marjamäki
6d7dd7400d
Refactoring; Sort options alphabetically. Removed unused --check-diff functionality.
2020-04-26 10:22:12 +02:00
Daniel Marjamäki
47c998e52d
Fixed #9689 (setVarId: wrong varid when 'not' is used)
2020-04-25 14:42:45 +02:00
Daniel Marjamäki
39710f106c
Fixed #9693 (Bug hunting: Segmentation fault with --bug-hunting and clangimport.cpp)
2020-04-25 10:13:18 +02:00
Oliver Stöneberg
04bd2bdb74
some sanitizer build fixes and cleanups ( #2621 )
...
* cleaned up sanitizer build flags
* exprengine.cpp: work around linker error with Clang and UBSAN
2020-04-24 21:17:06 +02:00
Daniel Marjamäki
3042bbdc3d
Bug hunting: Handle early returns faster
2020-04-24 18:51:54 +02:00
Paul Fultz II
2a09465a07
Fix issue 9686: Regression: ValueFlow should handle try/catch better ( #2618 )
2020-04-22 19:20:03 +02:00
Oliver Stöneberg
1388e9385b
cleaned up setting of compiler options and a few more things in CMake ( #2599 )
...
* cleaned up compiler options related code in CMake
* moved cmake_minimum_required() and raised to latest 2.8.x version
* use proper compiler version check / print compiler version
* fixed linking of sanitized builds
* added proper version checks to newer Clang warnings and enabled them / moved tinyxml_objs flags to proper compiler
* disabled -Wdeprecated-declarations for Clang
* compileroptions.cmake: removed unnecessary check for clang++ existence - CMAKE_CXX_COMPILER_ID is determined by CMake
* printInfo.cmake: removed unnecessary message for ANALYZE_ADDRESS - LSAN is part of ASAN and enabled by default
* cleaned up if() comparisons in CMake
* added/adjusted TODOs
2020-04-22 11:04:19 +02:00
Daniel Marjamäki
387f0a268b
Clang import: Better bailout for syntax errors when build dir is not used
2020-04-22 10:27:44 +02:00
Paul Fultz II
d88557bc18
Rename constArgument to knownArgument ( #2616 )
2020-04-22 09:13:35 +02:00
Daniel Marjamäki
05dcb9a435
Clang import; Allow Clang import without a Cppcheck build dir
2020-04-21 22:26:34 +02:00
Oliver Stöneberg
1af959af2c
fixed -Wextra-semi-stmt Clang warnings ( #2553 )
...
* fixed -Wextra-semi-stmt Clang warnings
* adjusted REDIRECT macro to require a semicolon
* testmathlib.cpp: rolled back accidental change
2020-04-21 17:27:51 +02:00
Daniel Marjamäki
bda73600e0
Tokenizer: Improved removal of unused template ( #9588 )
2020-04-20 20:48:22 +02:00
Daniel Marjamäki
da6e0308c5
Fixed #9195 (False positive: shadowFunction when constructor is shadowed)
2020-04-20 18:02:10 +02:00
Zorgovskiy
08fc956990
Fixes issue #9664 ( #2614 )
2020-04-20 08:59:35 +02:00
Daniel Marjamäki
219180b00a
Fixed #9038 (Auto type with explicit pointer symbol detected as integer)
2020-04-19 20:08:47 +02:00