Commit Graph

11781 Commits

Author SHA1 Message Date
orbitcowboy a8816a2d2f std.cfg: Improved configuration of some math functions and added more regression tests 2022-07-09 16:32:21 +02:00
orbitcowboy c2e132b1a3 std.cfg: Improved configuration of asinh(). 2022-07-09 16:14:58 +02:00
orbitcowboy 2f41a8dbdd std.cfg: Improved zerodiv test of math functions and demonstrate that constants from <cmath> can be applied as well. 2022-07-09 10:09:43 +02:00
Paul Fultz II 6b72274c67
Evaluate math library functions in valueflow (#4255)
* Evaluate math library functions in valueflow

* Format
2022-07-09 07:40:32 +02:00
Paul Fultz II edebe746bc
Fix 10361: false negative: uninitvar (std::next(iterator)) (#4256) 2022-07-09 07:39:04 +02:00
Paul Fultz II 0b63e7273d
Fix 11162: FP: knownConditionTrueFalse (#4254)
* Fix 11162: FP: knownConditionTrueFalse

* Format
2022-07-09 00:57:25 +02:00
Oliver Stöneberg b51aea5531
separated process execution code into `ProcessExecutor` (#4249) 2022-07-08 16:42:57 +02:00
Tau c17e2b9826
Correctly interpret boolean literals in `execute()` (#4251)
* Correctly interpret boolean literals in `execute()`

* Add regeression test case for boolean literals
2022-07-08 12:39:29 +02:00
chrchr-github bd92e7411c
Fix #11163 Hang on smart pointer with auto type deduction (#4250)
* Fix #11163 Hang on smart pointer with auto type deduction

* Format

* Format
2022-07-08 12:37:53 +02:00
chrchr-github 89a9e5ecc6
Fix #9944 FP: terminateStrncpy doesn't account for size check (#4252)
* Fix #9944 FP: terminateStrncpy doesn't account for size check

* Fix container size check

* Undo

* Format

* Rebuild

* Rebuild
2022-07-08 12:35:21 +02:00
Daniel Marjamäki d1812c8022 Cppcheck: Write product name if provided in xml output 2022-07-07 17:35:13 +02:00
Daniel Marjamäki d8239b26f1 Tokenizer: Remove simplifyCalculations from simplifyTokenList2 2022-07-04 22:54:43 +02:00
chrchr-github 22aeeb1788
Fix ClangImport crash on Windows paths (#4246)
* Fix crash on Windows paths

* Fix test

* Enable fix

* Cut trailing ':'
2022-07-02 17:43:52 +02:00
orbitcowboy b170a9c61e wxwidgets.cfg: Fixed wrong configuration of wxRegEx::GetMatch(). 2022-07-02 09:24:22 +02:00
chrchr-github 596f75e2af
Fix FP compareValueOutOfTypeRangeError (#4245)
* Fix FP compareValueOutOfTypeRangeError

* Remove suppressions
2022-07-01 10:48:32 +02:00
chrchr-github 27578e9c4c
Fix FP returnStdMoveLocal (#4244) 2022-06-30 13:50:31 +02:00
chrchr-github d8e64b4cbb
Fix FP leakNoVarFunctionCall (#4243)
* Fix #10857 FN: leakNoVarFunctionCall

* Fix TODO

* Fix #10858 FN: leakNoVarFunctionCall (if ( b && malloc ) )

* #11155 FN: leakNoVarFunctionCall (ternary operator)

* Fix #11157 FN: leakNoVarFunctionCall (switch condition)

* Fix FN constStatement

* Fix FP leakNoVarFunctionCall

* Fix FP leakNoVarFunctionCall

* Format

* Fix FP leakNoVarFunctionCall with unknown function

* Fix FP leakNoVarFunctionCall
2022-06-30 13:05:28 +02:00
chrchr-github 06b408ea20
Fix FP leakNoVarFunctionCall with unknown function (#4242)
* Fix #10857 FN: leakNoVarFunctionCall

* Fix TODO

* Fix #10858 FN: leakNoVarFunctionCall (if ( b && malloc ) )

* #11155 FN: leakNoVarFunctionCall (ternary operator)

* Fix #11157 FN: leakNoVarFunctionCall (switch condition)

* Fix FN constStatement

* Fix FP leakNoVarFunctionCall

* Fix FP leakNoVarFunctionCall

* Format

* Fix FP leakNoVarFunctionCall with unknown function
2022-06-29 13:43:17 +02:00
chrchr-github b90a726441
Fix FP leakNoVarFunctionCall (#4241)
* Fix #10857 FN: leakNoVarFunctionCall

* Fix TODO

* Fix #10858 FN: leakNoVarFunctionCall (if ( b && malloc ) )

* #11155 FN: leakNoVarFunctionCall (ternary operator)

* Fix #11157 FN: leakNoVarFunctionCall (switch condition)

* Fix FN constStatement

* Fix FP leakNoVarFunctionCall

* Fix FP leakNoVarFunctionCall

* Format
2022-06-29 07:22:26 +02:00
Paul Fultz II 185294499c
Adjust the severity of the uninitvar (#4234) 2022-06-28 22:52:35 +02:00
chrchr-github f8b796403b
Fix #11146 Crash in expandTemplate() (#4238) 2022-06-28 22:43:34 +02:00
chrchr-github 2223cd24b9
Fix #11157 FN: leakNoVarFunctionCall (switch condition) (#4240)
* Fix #10857 FN: leakNoVarFunctionCall

* Fix TODO

* Fix #10858 FN: leakNoVarFunctionCall (if ( b && malloc ) )

* #11155 FN: leakNoVarFunctionCall (ternary operator)

* Fix #11157 FN: leakNoVarFunctionCall (switch condition)

* Fix FN constStatement

* Fix FP leakNoVarFunctionCall
2022-06-28 14:02:02 +02:00
chrchr-github cdeebc15ea
Fix #11155 FN: leakNoVarFunctionCall (ternary operator) (#4239)
* Fix #10857 FN: leakNoVarFunctionCall

* Fix TODO

* Fix #10858 FN: leakNoVarFunctionCall (if ( b && malloc ) )

* #11155 FN: leakNoVarFunctionCall (ternary operator)
2022-06-27 20:55:09 +02:00
chrchr-github e7e23e87c2
Fix #10858 FN: leakNoVarFunctionCall (if ( b && malloc ) ) (#4237)
* Fix #10857 FN: leakNoVarFunctionCall

* Fix TODO

* Fix #10858 FN: leakNoVarFunctionCall (if ( b && malloc ) )
2022-06-27 19:35:22 +02:00
chrchr-github 88bf11abba
Fix #10857 FN: leakNoVarFunctionCall (#4236)
* Fix #10857 FN: leakNoVarFunctionCall

* Fix TODO
2022-06-27 14:19:19 +02:00
chrchr-github 242afc389d
Fix #11148 Regression: Parameter \'ptr\' can be declared as pointer to const (#4233) 2022-06-25 21:42:55 +02:00
chrchr-github 63e567eb50
Remove simplifyKnownVariables() (#4232)
* Remove simplifyKnownVariables()

* Add some test cases back

* Remove unused functions

* Format
2022-06-25 08:38:17 +02:00
chrchr-github 11860cce4b
Add test for #10463 (#4231)
* Add test for #10643

* Comment

* Fox comment
2022-06-24 13:55:04 +02:00
chrchr-github 60c1eef659
Fix FP containerOutOfBounds with std::map (#4230) 2022-06-23 20:26:47 +02:00
chrchr-github f1212e66f7
Fix FP constVariable with 2D array. (#4228)
Test case #8717 was actually a FP as well.
2022-06-22 21:22:04 +02:00
Daniel Marjamäki 1d5166d70c CheckClass: Fix false negatives for uninitMemberVar 2022-06-21 19:28:08 +02:00
chrchr-github a658baf962
Fix #11143 FP: unreadVariable (remove simplifyMathExpressions()) (#4227)
* Fix #11143 FP: unreadVariable (remove simplifyMathExpressions())

* Remove unused function, tests
2022-06-21 15:42:23 +02:00
chrchr-github 0d4b4394bb
Fix FP with embedded zeros (#4226)
* Partial fix for #11137 FN: invalidFunctionArgStr printf argument

* Typo

* Remove <strz>, suppressions

* Add suppresion, remove <strz>

* Add suppressions

* Fix FP with embedded zeros

* Merge
2022-06-21 13:33:45 +02:00
chrchr-github de2509f1ac
Fix FP with complex array size expression (#4225)
* Partial fix for #11137 FN: invalidFunctionArgStr printf argument

* Typo

* Remove <strz>, suppressions

* Add suppresion, remove <strz>

* Add suppressions

* Fix FP with complex array size expression
2022-06-21 00:12:11 +02:00
chrchr-github 5b9fa9657d
Partial fix for #11137 FN: invalidFunctionArgStr printf argument (#4224)
* Partial fix for #11137 FN: invalidFunctionArgStr printf argument

* Typo

* Remove <strz>, suppressions

* Add suppresion, remove <strz>

* Add suppressions
2022-06-20 20:02:22 +02:00
Paul Fultz II 6843bf628b
Use the correct test name for SKIP_TESTS (#4221) 2022-06-19 19:26:49 +02:00
PKEuS 9eb16e1002
Replaced check for pipe() buffer size by ordinary CheckBufferOverrun, provide required Library configuration option (#4183)
Merged from LCppC.
2022-06-19 12:01:55 +02:00
Daniel Marjamäki 6873f5237b Tokenizer: removing more stuff from simplifyTokenList2 2022-06-19 10:41:15 +02:00
orbitcowboy 3dcdd5f264 std.cfg: Added a TODO test case 2022-06-19 10:13:22 +02:00
Daniel Marjamäki a7815ed5b0 Tokenizer: Remove more stuff from simplifyTokenList2 2022-06-18 07:31:36 +02:00
Daniel Marjamäki aa8c17a701 Tokenizer: remove stuff from simplifyTokenList2 2022-06-17 09:44:58 +02:00
Daniel Marjamäki 968d8d153e Fixed #11101 (False positive: derived union members are initialized in constructor) 2022-06-16 20:17:57 +02:00
Paul Fultz II 3e09503561
Fix 11087: false negative: usage of reference to member of temporary object not detected (#4217)
* Fix 11087: false negative: usage of reference to member of temporary object not detected

* Format

* Add another test case

* Fix FP with pointer

* Format
2022-06-16 19:26:36 +02:00
Paul Fultz II 9cecc8468e
Fix 10570: Improve check; condition then pointer dereference, different pointers (#4216)
* Try to use after assign in loop

* Update valueflow forward to handle init tokens

* Fix tests

* Make test TODO

* Format

* Add tests

* Format

* Fix ubsan error

* Use simpleMatch
2022-06-16 19:26:23 +02:00
Paul Fultz II de51ebbcf4
Fix 9135: Access of moved variable not detected in loop (#4215)
* Fix 9135: Access of moved variable not detected in loop

* Format

* Fix issue with pushing back on container

* Format

* Fix null pointer

* Remove yeild for now
2022-06-16 17:40:09 +02:00
Daniel Marjamäki dbb12cb333 Tokenizer: Remove some functions from simplifyTokenList2 2022-06-16 14:06:07 +02:00
chrchr-github 176eefcbf3
Fix #10655 FN bitwiseOnBoolean with unseen function (#4214) 2022-06-14 23:08:17 +02:00
chrchr-github de9b65c737
Add tests for #9194, #10415, #4759, #9876, #10006 (#4213)
* Add test for #10152

* Add test for #9773

* Fix test

* Add test for #7529

* Add test for #6371

* Add test for #6475

* Format

* Format

* Fix test

* Remove duplicate test

* Add valueflow test

* Rebuild

* Add tests for #9194, #10415, #4759, #9876, #10006
2022-06-14 13:05:07 +02:00
chrchr-github 6d22d6a8ae
Fix FP unusedVar with side effects in destructor (#4212) 2022-06-14 09:55:22 +02:00
chrchr-github 6f5a5fd947
Add some tests (#4211)
* Add test for #10152

* Add test for #9773

* Fix test

* Add test for #7529

* Add test for #6371

* Add test for #6475

* Format

* Format

* Fix test

* Remove duplicate test

* Add valueflow test

* Rebuild
2022-06-14 09:54:45 +02:00