Commit Graph

13587 Commits

Author SHA1 Message Date
Oliver Stöneberg 7c9b9a65b1
cppcheck.vcxproj: fixed invalid standard setting in `Debug-PCRE` configuration for `cppcheck` causing build failures with SmallVector () 2022-04-20 20:29:43 +02:00
Oliver Stöneberg 36ef4dc5b8
added support for Qt6 () 2022-04-15 18:49:24 +02:00
Oliver Stöneberg 8f728cb4b6
added (partial) support for specifying C++23 and support more "-std" options () 2022-04-15 16:17:36 +02:00
chrchr-github 6e69b751eb
Fix Match pattern () 2022-04-15 08:48:49 +02:00
Paul Fultz II 28cf14f110
Fix 10975: false negative: dangling reference in class ()
* Fix 10975: false negative: dangling reference in class

* Format
2022-04-14 18:59:12 +02:00
chrchr-github 6450d5701c
Fix FP arrayIndexOutOfBoundsCond with sizeof ()
* Fix  FP constVariable with pointer typedef

* Fix flag check

* Use isStatic()

* Fix  FP arrayIndexOutOfBoundsCond with sizeof and extra parentheses
2022-04-14 18:13:29 +02:00
Paul Fultz II 6deb8068fa
Fix 10981: ValueFlow: multiplication with 0 should have known value 0 () 2022-04-14 18:13:04 +02:00
Paul Fultz II 09597bc7e8
Fix 10956: ValueFlow: Incorrect value when assigned to two variables ()
* Fix 10956: ValueFlow: Incorrect value when assigned to two variables

* Format
2022-04-14 07:35:07 +02:00
chrchr-github 7721cd14b6
Fix FP constVariable with pointer typedef ()
* Fix  FP constVariable with pointer typedef

* Fix flag check

* Use isStatic()
2022-04-13 21:56:45 +02:00
Oliver Stöneberg 16e90ed3e2
smallvector.h: reverted bogus noExplicitConstructor fix and suppress the warning () 2022-04-13 20:50:04 +02:00
chrchr-github 8203c74c40
Fix FP sizeofDivisionMemfunc ()
* Fix  FP sizeofDivisionMemfunc when result is multiplied again with sizeof later

* Format
2022-04-13 18:21:56 +02:00
chrchr-github 938517b80a
Fix FP unused private method () 2022-04-13 14:49:28 +02:00
chrchr-github f323e8a6c6
Fix FP functionConst ()
* Fix  FP functionConst

* Format

* Format
2022-04-13 12:25:36 +02:00
chrchr-github 55cb396d18
Fix Same template name confuses check () 2022-04-13 12:25:21 +02:00
chrchr-github ea65fe2b63
Fix another FP divideSizeof ()
* Fix FP divideSizeof

* Format

* Undo

* simpleMatch

* Fix another FP divideSizeof
2022-04-13 12:24:35 +02:00
Oliver Stöneberg 45158ec064
cleaned up includes based on include-what-you-use ()
* cleaned up includes based on include-what-you-use

* updated translations
2022-04-13 12:24:00 +02:00
chrchr-github 5ac4afa5b8
Fix cppcheckError with spaceship operator () ()
* Fix cppcheckError with starship operator ()

* Fix test case

* Return result
2022-04-13 12:23:38 +02:00
Paul Fultz II 6c82fb05a4
Fix 10954: False positive: returnDanglingLifetime when using c_str() () 2022-04-12 08:09:13 +02:00
Paul Fultz II 61b87bcc60
Fix 10955: False positive: containerOutOfBounds when using a const reference member () 2022-04-12 08:07:55 +02:00
chrchr-github 00badff622
Fix FP functionConst ()
* Fix  FP functionConst

* Update releasenotes.txt
2022-04-11 22:55:16 +02:00
chrchr-github 28a024ac4a
Fix incorrectLogicOperator/knownConditionTrueFalse for constexpr () 2022-04-11 20:42:54 +02:00
chrchr-github bf6bcafc56
Fix FP divideSizeof () 2022-04-11 20:41:59 +02:00
Oliver Stöneberg a98346bbe0
generate a program database in all Visual Studio configurations () 2022-04-11 11:28:07 +02:00
Daniel Marjamäki 8f386e15fd Remove bug hunting. This feature will be provided in Cppcheck premium. 2022-04-11 07:31:33 +02:00
Paul Fultz II 99757c6d06
ValueFlow: Set values to parameters to escape functions ()
* ValueFlow: Set values to parameters to escape functions

* Format
2022-04-11 07:23:58 +02:00
Paul Fultz II d97942d3c6
Fix 6577: Detect pointer to uninitialised memory with clock_settime() ()
* Fix 6577: Detect pointer to uninitialised memory with clock_settime()

* Format
2022-04-11 07:23:44 +02:00
Paul Fultz II 45b4580554
Fix 10957: Crash on valid code () 2022-04-10 22:47:58 +02:00
chrchr-github bd9f5231b8
Fix FP divideSizeof with dereferenced pointer-to-pointer () 2022-04-10 22:47:27 +02:00
chrchr-github c8936d04f6
Fix New Check : Return value of "new" ignored () 2022-04-09 19:06:32 +02:00
Oliver Stöneberg 25ef9eeb26
use std::string::empty() () 2022-04-09 19:02:37 +02:00
chrchr-github 0636018df3
Fix FP: unassignedVariable with structured binding () 2022-04-09 14:50:30 +02:00
chrchr-github 2bccde0e3b
Fix FP Logical condition considered always false () 2022-04-09 14:09:10 +02:00
chrchr-github 38bc0ad4c3
Fix regression: wrong member variable () 2022-04-08 08:23:10 +02:00
Paul Fultz II d2a0b0f78e
Fix 10951: FP knownEmptyContainer with east-const ()
* Fix 10951: FP knownEmptyContainer with east-const

* Format

* Use simpleMatch
2022-04-08 08:22:39 +02:00
chrchr-github ceb86afc22
Fix FP constStatement with cast in return () 2022-04-07 14:11:14 +02:00
Paul Fultz II 4c1aeb0cb1
Remove old pointer alias check () 2022-04-07 11:36:15 +02:00
chrchr-github 52b4aeb279
Fix FP knownConditionTrueFalse with double to int cast () 2022-04-07 10:42:57 +02:00
Paul Fultz II dad10f2ab7
Fix 7684: ValueFlow: function call 'X::GetSize()' ()
* Improve getting function to calculate the return

* Add test

* Format

* Move to cpp to avoid FP

* Format
2022-04-07 06:49:25 +02:00
Paul Fultz II 74667d1e2a
Fix 10418: false negative: knownConditionTrueFalse ()
* Improve handling inverted condition

* Fix tests

* Rename variables for clarity

* Add initial test

* Add another test

* Format

* Fix FP
2022-04-07 06:48:13 +02:00
Paul Fultz II 09c8cfb2ae
Fix 6624: false negative: std::vector out of bounds access not detected ()
* Fix 6624: false negative: std::vector out of bounds access not detected

* Format

* Add test for auto

* Fix tests

* Format
2022-04-07 06:47:15 +02:00
Paul Fultz II bb640c4879
Fix 10950: Crash on function declaration ()
* Fix 10950: Crash on function declaration

* Format
2022-04-06 19:00:05 +02:00
chrchr-github b73aeeda0e
Fix FP constStatement with comma operator ()
* Fix FP constStatement with comma operator

* Format
2022-04-06 16:58:17 +02:00
Paul Fultz II 4fde7f8b18
Fix 10449: Regression: knownConditionTrueFalse (strlen/wcslen) ()
* Refactor library function usage

* Evaluate library function in program memory

* Fix and add tests

* Format
2022-04-06 06:35:38 +02:00
Paul Fultz II 1d92665ad2
Fix 10867: false negative: containerOutOfBounds with std::array (regression) ()
* Fix 10867: false negative: containerOutOfBounds with std::array (regression)

* Format
2022-04-06 06:25:28 +02:00
chrchr-github 4c375e7224
Fix FP redundantInitialization with lambda / debug: valueFlowConditionExpressions bailout ()
* Fix  FP redundantInitialization with lambda

* Fix  debug: valueFlowConditionExpressions bailout

* Format
2022-04-05 23:19:17 +02:00
chrchr-github f5313dc519
Fix crash with defaulted destructor () 2022-04-05 23:18:08 +02:00
chrchr-github c4dcfef385
Fix debug: Executable scope 'x' with unknown function. ()
* Fix  debug: Executable scope 'x' with unknown function

* Format

* Add test for 

* Fix  debug: Executable scope 'x' with unknown function.
2022-04-05 15:52:16 +02:00
chrchr-github cfbbeb4b1b
Partial fix for FN containerOutOfBounds with std::array ()
* Partial fix for  FN containerOutOfBounds with std::array

* Format

* Format

* Optimize
2022-04-05 07:34:20 +02:00
chrchr-github b79885c6af
Fix debug: Executable scope 'x' with unknown function ()
* Fix  debug: Executable scope 'x' with unknown function

* Format
2022-04-05 07:34:06 +02:00
chrchr-github aae810dd2c
Fix FP: duplicateValueTenary () 2022-04-04 06:33:54 +02:00