Commit Graph

11334 Commits

Author SHA1 Message Date
chrchr-github 18e00bb4fd
Fix #10817 Crash in checkPassByReference() / #10810 Stack overflow with decltype / #10763 Crash on invalid code (#3840)
* Fix #10817 Crash in checkPassByReference()

* Format

* Fix #10810 Stack overflow with decltype

* Fix #10763 Crash on invalid code in TemplateSimplifier::templateParameters
2022-02-18 12:59:21 +01:00
chrchr-github 6635e6cc07
Fix #10795 cppcheckError with for loop (#3841) 2022-02-17 22:12:19 +01:00
chrchr-github 2f46e57311
Add leak-ignore for fopen_s(), test cases (#3839)
* Add leak-ignore for fopen_s(), test cases

* Format
2022-02-17 16:22:30 +01:00
chrchr-github a1adbff683
Fix #1733 FN Memory leak not detected when variable is 'used' by allocation function in condition (#3838) 2022-02-16 21:31:24 +01:00
chrchr-github b07814f329
Fix #3462 FN missed class members in copy operator of derived class (#3837) 2022-02-16 21:30:19 +01:00
chrchr-github 6488cb6e76
Add test for #7433 (#3836) 2022-02-16 16:43:06 +01:00
Daniel Marjamäki c968aeaf73 Import project: do not crash when importing compile database generated by IAR workbench 2022-02-16 08:35:47 +01:00
chrchr-github 9582032906
Fix #8485 FP uninitMemberVar - ctor calls function with smart pointer argument (#3835) 2022-02-16 07:02:26 +01:00
chrchr-github 52f549fa87
Fix crash on garbage code (#3834) 2022-02-15 20:19:03 +01:00
chrchr-github 907218254e
#8126 Fix previous commit (#3833)
* Fix #8126 unsafeClassCanLeak missing for array of pointers

* #8126 Fix previous commit

* Format

* Format
2022-02-15 20:03:02 +01:00
chrchr-github e7e2439347
Fix #8126 unsafeClassCanLeak missing for array of pointers (#3832) 2022-02-15 14:28:19 +01:00
chrchr-github a5674182bb
Add test for #5473 (#3831) 2022-02-15 12:52:10 +01:00
orbitcowboy d131235a53 test windows.cfg: Added regression test for _wtoi_l and _atoi_l. 2022-02-15 11:37:10 +01:00
Daniel Marjamäki f2420509c9 Revert "constPointer: Fix false positives when pointer is not read"
This reverts commit 6427b4888b.

If variable/parameter is unused it is better to warn about that.
2022-02-13 08:40:45 +01:00
Daniel Marjamäki 6427b4888b constPointer: Fix false positives when pointer is not read 2022-02-12 22:23:25 +01:00
chrchr-github 0a99e3b6fc
Partial fix for #9407 FN redundant assignment/unreadVariable (#3651) 2022-02-12 15:32:08 +01:00
Daniel Marjamäki 30cec97cc8 Tokenizer: Support C++20 default bit-field member initializer 2022-02-12 12:19:08 +01:00
chrchr-github edc5106237
Fix #9092 FN missingOverride - subclass in namespace (#3793) 2022-02-12 08:19:07 +01:00
chrchr-github c5ab936088
Fix #10405 FN shadowVariable in range-based for loop (#3789) 2022-02-12 08:10:53 +01:00
Rikard Falkeborn d4cd249c21
10671 fix const iterator function const take two (#3802)
* Revert "Revert "Fix #10671: functionConst FN with begin/end and const_iterator (#3749)""

This reverts commit 9f6a36c1a8.

* Fix crash by adding missing null check
2022-02-11 21:23:23 +01:00
chrchr-github 5f3ddabd56
Fix FP constParameter with std::map (#3823) 2022-02-11 19:40:11 +01:00
Paul Fultz II 78228599da
Fix 10800: Hang / memory exhaustion on numerical code (#3822)
* Fix 10800: Hang / memory exhaustion on numerical code

* Format

* Add another test

* Format
2022-02-11 06:52:28 +01:00
Oliver Stöneberg f32583e097
removed OVERRIDE and FINAL defines and use the keywords directly (#3767) 2022-02-10 23:02:24 +01:00
Julien Marrec 2535bf984b
Allow passing std::string_view by value (#3817) 2022-02-10 21:01:12 +01:00
chrchr-github cd7532df21
Fix #7709 FN C-style pointer casting with built-in or typedef types /… (#3814) 2022-02-10 20:48:51 +01:00
Paul Fultz II 5d25050b06
Fix 10788: False positive: zerodivcond when using an assert (#3816) 2022-02-10 20:22:14 +01:00
chrchr-github ddd84f9b98
Add tests/TODO for #7950, #9974 (#3818)
* Add tests/TODO for #7950, #9974

* Comment
2022-02-10 20:05:14 +01:00
orbitcowboy 65c0ef8eb0 Added a regression test for ticket #6832. 2022-02-10 14:13:50 +01:00
chrchr-github 24e9859158
Fix #10357 FP stlcstrParam due to incorrect overload resolution (#3813)
* Fix #10357 FP stlcstrParam due to incorrect overload resolution

* Variable shadowing
2022-02-10 11:17:06 +01:00
Paul Fultz II a50452517d
Fix 10794: Crash in MultiValueFlowAnalyzer::getProgramState() (#3815)
* Fix 10794: Crash in MultiValueFlowAnalyzer::getProgramState()

* Format
2022-02-10 07:43:27 +01:00
orbitcowboy 09da69b1c7 posix.cfg: Added support for 'llseek()', which is obsolescent since glibc version 2.28 2022-02-09 08:34:35 +01:00
chrchr-github 2c7948102a
Fix #10145 FP AssignmentAddressToInteger with enum class (#3810) 2022-02-08 16:12:35 +01:00
chrchr-github e64ea20089
Fix #10527 FP variableScope for if with init-statement (#3811) 2022-02-08 16:12:09 +01:00
chrchr-github 966dbb1990
Windows.cfg: add UNREFERENCED_PARAMETER() macro (#3809) 2022-02-08 11:50:28 +01:00
Paul Fultz II 20a5224d7e
Fix 10784: False positive: returnDanglingLifetime using std::tie with variadic template parameters (#3805) 2022-02-08 09:03:51 +01:00
Paul Fultz II 260d155bb6
Fix 10785: False positive: constParameter when using member pointer (#3807) 2022-02-07 18:45:32 +01:00
orbitcowboy c983151b9c posix.cfg: Added support for lseek64(). 2022-02-07 14:15:48 +01:00
orbitcowboy bd1d8ea7b8 posix.cfg: Improved configuration of lseek(). 2022-02-07 13:58:38 +01:00
orbitcowboy 2dea968ec5 windows.cfg: Improved configuration of _fseeki64() 2022-02-07 09:12:31 +01:00
orbitcowboy a7b7b46d76 posix.cfg: Improved configuration of fseeko()/fseeko64(). 2022-02-07 09:03:39 +01:00
orbitcowboy 2f17147900 std.cfg: Improved configuration for fseek(). The 3rd argument is not allowed to be of Boolean type. 2022-02-07 09:02:24 +01:00
Paul Fultz II 569332a50a
Fix 10786: False positive: arrayIndexOutOfBoundsCond (#3803) 2022-02-06 20:14:13 +01:00
Paul Fultz II a639c59780
Fix 10787: False positive: knownConditionTrueFalse with a conditional exit (#3804) 2022-02-06 20:13:44 +01:00
orbitcowboy fa776051e9 Fixed Ticket 1001 - std.cfg: Invalid parameters for fseek() 2022-02-06 16:05:14 +01:00
Oliver Stöneberg 974dd5d49f
only use bundled tinyxml2 in CMake when configured to do so (#3806) 2022-02-06 13:02:52 +01:00
Daniel Marjamäki 3989408738 Update copyright year 2022-02-05 11:45:17 +01:00
chrchr-github 7f28edbe26
Fix #10789 Crash in CheckMemoryLeakInClass (#3797) 2022-02-04 19:32:23 +01:00
orbitcowboy 31ea13eb0c test std.cfg: Fixed wrong npos constant. 2022-02-04 12:39:43 +01:00
orbitcowboy 7062b0a973 std.cfg: Improved configuration of std::[w]string::substr(). Do not allow negative length arguments. 2022-02-04 12:30:37 +01:00
chrchr-github 17b538210d
Fix #10151 FP eraseDereference when returning iterator from loop (#3787) 2022-02-03 21:13:48 +01:00