Commit Graph

11857 Commits

Author SHA1 Message Date
Oliver Stöneberg 37bc0483a4
made check.h less heavy (#2633) 2020-05-23 07:16:49 +02:00
Paul Fultz II 0832830a95
Fix issue 9721: ValueFlow: Comparison is always false, but ValueFlow says it is always true (#2658) 2020-05-23 07:15:13 +02:00
Paul Fultz II 4270819728
Fix issue 9713: FP invalidContainerLoop when modifying container and immediately exiting the loop (#2659) 2020-05-23 07:14:45 +02:00
Paul Fultz II 6162ebd608
Fix issue 9714: FP invalidContainer related to auto and std::string::insert (#2660) 2020-05-23 07:13:55 +02:00
Paul Fultz II 526abd4b52
Fix issue 9738: ValueFlow: handle std::tie better (#2657) 2020-05-22 22:57:20 +02:00
Daniel Marjamäki c86cfdaa50 Fixed #9736 (False positive: knownArgument in assert calls) 2020-05-22 11:49:28 +02:00
Daniel Marjamäki 43b58dbc9e Fixed #9729 (AST: lambda with noexcept) 2020-05-22 11:29:10 +02:00
Daniel Marjamäki ac1ceb85b6 AST: improved AST when expression starts with %char% or %str% 2020-05-22 09:35:55 +02:00
Daniel Marjamäki 4c5310433c astyle formatting
[ci skip]
2020-05-22 08:48:28 +02:00
Daniel Marjamäki ffdf13fcdb AST: A little code cleanup 2020-05-22 08:48:06 +02:00
Paul Fultz II 8301fa8244
Fix issue 8144: valueFlowBeforeCondition: struct (#2645) 2020-05-21 08:47:48 +02:00
miltolstoy a9d8b3495d
feat: add modulo of one check (#9528) (#2650) 2020-05-20 23:01:32 +02:00
PKEuS 662745b504 Fixed several coverity messages 2020-05-20 18:54:16 +02:00
Ken-Patrick Lehrmann a96a879b6d
Fix crash in addons/test/test-misra.py (#2652) 2020-05-20 16:02:13 +02:00
Ken-Patrick Lehrmann 79d3f488da
Pass defines flags when calling clang (#2651) 2020-05-20 14:56:55 +02:00
Daniel Marjamäki 299e11c991 Fixed Cppcheck warnings 2020-05-19 21:55:28 +02:00
PKEuS dc701276de Optimizations to ValueFlow and ForwardAnalyzer:
- Remove errorPath of a value on assignment (this fixes enormous memory consumption for code with many subsequent assignments)
- De-virtualized a simple get function that was virtual for no reason
- Cloned function isAliasOf() for single values to avoid instantiating unnecessary std::list objects (
- Replaced a couple of trivial Token::Match/simpleMatch expressions by direct comparison
- Treat enumerators as literal values
2020-05-19 21:07:04 +02:00
Daniel Marjamäki 64291c6b61 fix Clang execution 2020-05-19 19:17:23 +02:00
Daniel Marjamäki 32e569704b executeCommand in CppCheckExecutor or QCheckThread 2020-05-19 16:04:40 +02:00
PKEuS baca1fbe04 Fixed compilation: Added missing include 2020-05-19 14:32:50 +02:00
PKEuS 22884888fb Optimization: Improved performance of ForwardAnalyzer by adding some pre-checks and combining conditions 2020-05-19 13:48:15 +02:00
PKEuS c155062cf2 Optimization: Speed up SymbolDatabase creation and Tokenizer::findGarbageCode() by using Token::isKeyword() for pre-checks 2020-05-19 13:48:15 +02:00
PKEuS f6788c0472 Fixed Token::isKeyword: Actually set this flag to a reasonable value in all code paths 2020-05-19 13:47:25 +02:00
PKEuS c9d8f607df Optimization: Reduced peak memory usage (30% in my test case) by immediately deleting simplecpp::TokenList while creating the cppcheck TokenList. 2020-05-19 12:08:17 +02:00
amai2012 d78ff975a0 Run dmake 2020-05-19 10:11:56 +02:00
Daniel Marjamäki 37646c9ffb revert accidental mode changes 2020-05-19 10:05:14 +02:00
PKEuS 09a30bd6b5 Optimization: Speed up Tokenizer::findGarbageCode() (by 15% in my test case) by avoiding iterating through token list multiple times 2020-05-19 08:54:47 +02:00
PKEuS a9cea9ad7c Fixed compilation (next attempt): Added more missing includes 2020-05-19 08:53:38 +02:00
PKEuS f0ac0c8675 Optimization: Remove simplecpp::TokenList as soon as cppecheck TokenList was created. This saves memory while checks are running (20% in my test case), although not peak memory 2020-05-19 08:41:05 +02:00
PKEuS ade253a730 Optimization: Reduced memory consumption of token list
- allocate memory for mTemplateSimplifierPointers only if necessary
- reordered member variables in TokenImpl
2020-05-19 08:40:24 +02:00
PKEuS c409daf918 Fixed compilation: Added missing include 2020-05-19 08:38:51 +02:00
PKEuS 4948f85460 Visual Studio: Updated solution
- Enable several compiler warnings again
- Let __cplusplus have a reasonable value
2020-05-19 08:35:13 +02:00
PKEuS d6390dbd14 Optimization: Improved performance of simplifyTypedef for code with lots of typedefs
20% performance gain when checking ExtremeTuxRacer sourcecode (with glext.h available)
2020-05-19 08:35:13 +02:00
Philipp Kloke 32923b7ac5 Refactorization: Fixed a couple of compiler warnings about reusing variable names 2020-05-19 08:35:12 +02:00
PKEuS 793ed68029 Refactorization: Moved code from header to source
- from utils.h to new utils.cpp
- from token.h to token.cpp
- from valueflow.h to valueflow.cpp
- from errorlogger.h to errorlogger.cpp
2020-05-19 08:35:12 +02:00
Daniel Marjamäki 65e9f6210c CLI: Tweak execution of python addons 2020-05-19 08:14:56 +02:00
Daniel Marjamäki 259724d6e3 astyle formatting
[ci skip]
2020-05-18 19:53:35 +02:00
shaneasd 7bfd686f04
Fix #9700 duplicateBranch false positive from missing scope operator :: in ast (#2646) 2020-05-18 19:31:13 +02:00
Daniel Marjamäki f6f489ea49 Try to make AppVeyor happy 2020-05-18 09:51:47 +02:00
Daniel Marjamäki aa7a4b8372 Try to make AppVeyor happy 2020-05-18 08:24:17 +02:00
Daniel Marjamäki a0f2fda53a Addons: If normal python fails, try 'python' 2020-05-18 07:44:46 +02:00
Daniel Marjamäki 2ef538c171 Tweak paths when executing addons in Cppcheck 2020-05-17 21:45:37 +02:00
Daniel Marjamäki 9eda399323 Less strict unknownMacro 2020-05-17 19:12:16 +02:00
Daniel Marjamäki 547d1b158e Fixed #9723 (GUI: inline suppressions does not work for addons) 2020-05-17 16:50:13 +02:00
Daniel Marjamäki 871cf379d5 ExprData: Better handling of ternary operator 2020-05-15 21:34:52 +02:00
Daniel Marjamäki 76f4fae806 Bug hunting; Started to activate some itc tests for uninitialized variables 2020-05-15 20:58:33 +02:00
Daniel Marjamäki 57e9036186 Cppcheck --addon command should use python3 by default. It can be overridden if needed. 2020-05-15 14:33:35 +02:00
Daniel Marjamäki e508950f4f ExprEngine; Activate bug hunting analysis for uninitialized variables/data. This analysis is pretty experimental right now. 2020-05-15 11:25:56 +02:00
Daniel Marjamäki 275c8e84d2 Set development version 2.0.99 2020-05-15 11:15:34 +02:00
versat 2fd2edd3f9 astyle formatting
[ci skip]
2020-05-14 18:18:14 +02:00