chrchr-github
32c7b919ba
Add tests for #1201 , #2654 , #6379 ( #4518 )
...
* Add test for #6541 , avoid duplicate warning
* Add test for #5475
* Fix test
* Merge
* Add test for #8666
* Fix #11239 checkLibraryCheckType with asm goto() (invalid varid)
* Format
* Add tests for #1201 , #2654
* Fix test
* Add test for #6379
2022-09-29 07:05:29 +02:00
chrchr-github
2808fc615e
Fix #10057 "statement without effect" / #4779 FN unusedScopedObject does not work for classes in different namespace ( #4500 )
...
* Partial fix for #10057 unused variable without assignment not detected
* Add test for #9672
* Fix #4779 FN unusedScopedObject does not work for classes in different namespace
* Merge
* Fix #10057 "statement without effect" (unused variable without assignment) not detected
* Format
2022-09-24 12:49:37 +02:00
Paul Fultz II
de7d02293f
Fix 11308: FP accessMoved with virtual function ( #4478 )
...
* Fix 11308: FP accessMoved with virtual function
* Format
2022-09-18 08:30:06 +02:00
chrchr-github
cb6f04a16c
Fix #11315 FP zerodivcond from enum definition / #11310 FP unassignedVariable with static variable ( #4476 )
...
* Fix #11315 FP zerodivcond from enum definition
* Simplify Boolean expression
* Fix #11310 FP unassignedVariable with static variable
2022-09-17 18:50:07 +02:00
Oliver Stöneberg
b3ec225480
iwyu.yml: use `debian:unstable` to always get latest include-what-you-use / cleaned up includes ( #4466 )
...
* iwyu.yml: use debian:unstable to always get latest include-what-you-use
* cleaned up includes based on include-what-you-use
* mitigated include-what-you-use false positives
2022-09-16 07:15:49 +02:00
Paul Fultz II
43caa32abf
Fix 9755: false negative: access of moved variable in conditional code ( #4459 )
...
* Fix 9755: false negative: access of moved variable in conditional code
* Format
2022-09-11 12:32:01 +02:00
Oliver Stöneberg
1b4141cbe5
added more missing `sstream` includes ( #4384 )
2022-08-19 18:23:15 +02:00
chrchr-github
2fee7a6e3f
Add test for #9744 , #11140 ( #4375 )
...
* Add test for #10603
* Add test for #10559
* Add test for #10212
* Format
* Add test for #9744
* Format
* Add test for #11140
2022-08-18 23:37:41 +02:00
chrchr-github
6a0c254d1f
Fix #9931 FP zerodiv (daca@home) ( #4379 )
...
* Fix #9931 FP zerodiv (daca@home)
* Format
* Parentheses
* clang-tidy
2022-08-18 20:38:36 +02:00
chrchr-github
4a64e20592
unusedScopedObject: Don't warn for void statements ( #4370 )
...
* Fix unusedScopedObject FPs
* Simplify
* Simplify
* Fix test
* Don't warn for void statements
* Format
2022-08-17 19:45:46 +02:00
chrchr-github
1a95515e47
Fix unusedScopedObject FPs ( #4364 )
2022-08-17 09:11:23 +02:00
Oliver Stöneberg
4bf5dcd29f
cleaned up includes based on include-what-you-use ( #4358 )
...
* cleaned up includes based on include-what-you-use
* testlibrary.cpp: no need for `empyString` optimization
2022-08-14 12:44:19 +02:00
chrchr-github
afef71f6b6
Partial fix for #10057 unused variable without assignment not detected ( #4348 )
...
* Partial fix for #10057 unused variable without assignment not detected
* Add test for #9672
2022-08-13 08:29:06 +02:00
Paul Fultz II
bfd9470600
Fix 11158: FP zerodiv in loop ( #4356 )
...
* Fix 11158: FP zerodiv in loop
* Format
* Add another test
* Format
* Fix FP
* Format
2022-08-13 08:27:20 +02:00
chrchr-github
c340b6ae6c
Fix #11191 FP moduloofone with pow() ( #4312 )
2022-07-28 22:11:23 +02:00
chrchr-github
109a031ec7
Fix #11195 Add redundantContinue check ( #4283 )
2022-07-16 16:02:58 +02:00
chrchr-github
b31e40f578
Add tests for #4336 , #4739 , #8319 , #6655 ( #4275 )
...
* Add tests for #4336 , #4739
* Add test for #8319
* Add test for #6655
2022-07-13 21:08:30 +02:00
PKEuS
f3565e1056
Improvement: Support member variables in CheckOther::checkIncompleteArrayFill() ( #4205 )
...
Merged from LCppC.
2022-07-12 19:43:48 +02:00
chrchr-github
f5c4a21eae
Fix #10704 FN redundantCopyLocalConst ( #4115 )
2022-07-10 11:33:24 +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
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
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
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
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
chrchr-github
ecb24e28bc
Fix #10191 FP redundantCopyLocalConst - referenced variable changes ( #4202 )
2022-06-11 16:58:33 +02:00
chrchr-github
8579feb3aa
Fix #10545 FP redundantCopyLocalConst with modified object [inconclusive] ( #4197 )
...
* Fix #10545 FP redundantCopyLocalConst with modified object [inconclusive]
* Comment
2022-06-11 11:01:23 +02:00
chrchr-github
e6f2929fac
Fix #11085 FN constVariable with range-based for ( #4118 )
2022-06-03 19:24:59 +02:00
chrchr-github
cd7362e0e7
Fix FN with default init ( #4162 )
...
* Fix #11099 FP: variableScope when using range constructor to vector
* Format
* Fix FN with default init
2022-06-01 23:18:59 +02:00
chrchr-github
2452a2c01d
Fix #11099 FP: variableScope when using range constructor to vector ( #4161 )
...
* Fix #11099 FP: variableScope when using range constructor to vector
* Format
2022-06-01 21:15:41 +02:00
chrchr-github
7fbb9c7c13
Fix #10980 FN constVariable with range-based for loop ( #4144 )
...
* Fix #10980 FN constVariable with range-based for loop
* Format
* nullptr check
* Restrict scopes
* Add const
* Undo
* Add more const
2022-05-29 17:06:33 +02:00
chrchr-github
e1c51940a2
Fix #11095 FP constParameter with decremented pointer ( #4131 )
2022-05-28 08:32:58 +02:00
chrchr-github
2ceaf308de
Fix #11084 : ValueType for pointer typedef, don't warn for typedef'd pointers, improve error message ( #4123 )
...
* Fix ValueType for pointer typedef
* Add test
* Don't warn for typedef'd pointers, improve error message
* Fix tests
* Add TODO
* Fix test
* Set isSimplifiedTypedef() for more tokens, add test
* Add test
2022-05-24 10:09:48 +02:00
chrchr-github
22a4fdb6c4
Fix crash in checkPassByReference() ( #4122 )
2022-05-21 16:02:35 +02:00
chrchr-github
52f507d1fb
Fix #8004 unintentional semicolon in expression '.. ; +dostuff();' ( #4109 )
...
* Fix #8004 unintentional semicolon in expression '.. ; +dostuff();'
* Improve error message
* Don't remove single unary + in front of variables
2022-05-13 06:54:02 +02:00
chrchr-github
54f832a2fe
Fix #10569 FN: duplicateExpression with multiple strings compared ( #4087 )
2022-05-09 21:05:35 +02:00
chrchr-github
aebc080c0f
Fix #11041 FN constVariable with array of pointers [regression] ( #4080 )
...
* Fix #11041 FN constVariable with array of pointers [regression]
* Use std::vector for deterministic order of results, use helper variables
2022-05-05 06:54:03 +02:00
chrchr-github
9a379925cd
FIx FN shadowVariable in static function ( #4079 )
...
* FIx FN shadowVariable in static function
* Use functionOf
2022-05-04 17:56:16 +02:00
chrchr-github
e2069dd1b9
Fix #10650 FN knownConditionTrueFalse with const int value ( #4078 )
2022-05-04 14:25:00 +02:00
chrchr-github
1e40a2e73e
Fix #5210 C-style pointer casting not detected for casts to ** ( #4075 )
2022-05-03 20:15:42 +02:00
chrchr-github
e9a0d7979e
Fix #11014 FN redundantPointerOp / remove simplifyMulAndParens() ( #4062 )
2022-05-01 15:46:07 +02:00
chrchr-github
e7afb3045b
Fix FP redundantPointerOp with macro ( #4061 )
...
* Fix #10991 FN: Redundant pointer operation
* Fix FP redundantPointerOp
* Check for LValue
* Fix FP redundantPointerOp with macro
* Format
2022-04-29 13:23:50 +02:00
chrchr-github
8dbe6994a2
Fix FP redundantPointerOp ( #4058 )
...
* Fix #10991 FN: Redundant pointer operation
* Fix FP redundantPointerOp
* Check for LValue
2022-04-28 15:25:31 +02:00
chrchr-github
034140e7e1
Fix #10991 FN: Redundant pointer operation ( #4054 )
2022-04-27 19:52:56 +02:00
chrchr-github
81f9b9b2b7
Fix FP with ptr to ptr const ( #4050 )
2022-04-25 21:45:11 +02:00
chrchr-github
7721cd14b6
Fix #10466 FP constVariable with pointer typedef ( #4018 )
...
* Fix #10466 FP constVariable with pointer typedef
* Fix flag check
* Use isStatic()
2022-04-13 21:56:45 +02:00
chrchr-github
da1e2b22be
Add some tests ( #4014 )
...
* Test for #10454
* Test for #10493
* Test for #10069
* Test for #10228
* Fix test case
2022-04-13 12:25:53 +02:00
chrchr-github
4c375e7224
Fix #9815 FP redundantInitialization with lambda / #10864 debug: valueFlowConditionExpressions bailout ( #3970 )
...
* Fix #9815 FP redundantInitialization with lambda
* Fix #10864 debug: valueFlowConditionExpressions bailout
* Format
2022-04-05 23:19:17 +02:00
chrchr-github
aae810dd2c
Fix #10107 FP: duplicateValueTenary ( #3969 )
2022-04-04 06:33:54 +02:00
chrchr-github
7a7b3e40eb
Fix regression FN constVariable with static arrays ( #3965 )
...
* Fix regression FN constVariable with static arrays
* Fix test case
2022-04-02 20:39:45 +02:00
chrchr-github
a9f29fbc09
Fix #10307 FP functionStatic with class template and east-const / #10471 FP constParameter with std::array and east-const ( #3963 )
2022-04-01 23:26:44 +02:00
chrchr-github
47ba053054
Fix #10744 FP constVariable with static pointer ( #3957 )
2022-03-30 19:21:09 +02:00
chrchr-github
63d96e49fc
Fix #10928 , #10930 FP constStatement ( #3946 )
...
* Fix #10928 , #10930 FP constStatement
* Fix test cases (first one did not compile)
2022-03-27 07:59:29 +02:00
chrchr-github
5ed521622f
Fix #10923 FP constStatement with ptr to ptr to ptr ( #3944 )
...
* Fix #10923 FP constStatement with ptr to ptr to ptr
* simpleMatch
2022-03-26 06:12:26 +01:00
chrchr-github
796ad6c008
Fix #10913 FP variableScope - vector referenced via iterator ( #3936 )
2022-03-25 09:21:17 +01:00
chrchr-github
39567ea8c8
Fix #8541 FP variableScope (std::for_each with lambda) ( #3924 )
2022-03-22 21:50:46 +01:00
chrchr-github
0e147502cc
Fix #10888 FN variableScope with enum and struct ( #3920 )
...
* Fix #10888 FN variableScope with enum and struct
* Scope reduction
* Scope reduction
2022-03-21 16:05:38 +01:00
chrchr-github
297b0b5c60
Fix #10886 FP: Label 'enum' is not used. [unusedLabel] ( #3912 )
2022-03-17 17:38:23 +01:00
chrchr-github
f90a93591f
Add tests for #9871 , #10144 ( #3902 )
...
* Add test for #9871
* Add test for #10144
* Format
2022-03-15 12:54:19 +01:00
chrchr-github
f53793c413
Fix #10823 FP cstyleCast with function pointer and calling convention ( #3853 )
2022-02-23 09:12:14 +01:00
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
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
c5ab936088
Fix #10405 FN shadowVariable in range-based for loop ( #3789 )
2022-02-12 08:10:53 +01:00
chrchr-github
5f3ddabd56
Fix FP constParameter with std::map ( #3823 )
2022-02-11 19:40:11 +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
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
chrchr-github
e64ea20089
Fix #10527 FP variableScope for if with init-statement ( #3811 )
2022-02-08 16:12:09 +01:00
Paul Fultz II
260d155bb6
Fix 10785: False positive: constParameter when using member pointer ( #3807 )
2022-02-07 18:45:32 +01:00
Daniel Marjamäki
3989408738
Update copyright year
2022-02-05 11:45:17 +01:00
chrchr-github
511520d623
Fix #10679 FP constParameter with const/nonconst overload ( #3780 )
2022-02-02 19:38:32 +01:00
chrchr-github
dad64bfcc8
Fix #10091 FP shadowFunction with default destructor implementation / Tests for #8635 , #9776 , #9940 , #9951 , #10018 ( #3763 )
2022-02-02 19:30:49 +01:00
chrchr-github
0807924d32
Fix FP passedByValue for unions / FN passedByValue for array members ( #3784 )
2022-02-01 17:17:08 +01:00
Daniel Marjamäki
637aca8d59
Fixed #10752 (False positive: shadow variable in static method)
2022-01-28 16:03:06 +01:00
Oliver Stöneberg
171da2e6f9
avoid dependency on transitive includes - based on include-what-you-use ( #3757 )
2022-01-27 19:03:20 +01:00
chrchr-github
158f3d494e
Fix #10143 false positive: redundantInitialization with std::shared_ptr ( #3746 )
2022-01-24 21:50:50 +01:00
chrchr-github
b491fcc489
Add test cases for #9850 , #9910 ( #3747 )
2022-01-24 15:06:40 +01:00
chrchr-github
7f9ef8c321
Add test cases for #7899 , #7974 , #9256 ( #3726 )
...
* Add test case for #7899 and #7974
* Add test case for ##9256
2022-01-20 16:15:38 +01:00
chrchr-github
089ca67d78
Use TODO_ASSERT ( #3704 )
2022-01-18 22:03:52 +01:00
orbitcowboy
b6c010c17e
Added regression test for Ticket 7981.
2022-01-18 13:09:02 +01:00
Paul Fultz II
89bc226738
Fix 10718: Crash in CheckOther::checkDuplicateExpression ( #3713 )
2022-01-16 12:34:20 +01:00
chrchr-github
fe077fc141
Add test for #10312 ( #3673 )
2022-01-04 20:50:00 +01:00
Paul Fultz II
01a8890d6d
Fix 9760: False positive: constParameter on parameter used to take non-const pointer via array decaying ( #3660 )
2022-01-02 08:15:38 +01:00
chrchr-github
922e27de4c
Fix #7754 FP Same expression on both sides of '||' ( #3635 )
2021-12-31 08:24:05 +01:00
chrchr-github
f64097465f
Fix #9342 FP oppositeExpression - negated value is not opposite for bitwise logical operators ( #3615 )
2021-12-10 18:06:45 +01:00
chrchr-github
33c55f77a8
Fix #9570 ( #3608 )
2021-12-07 07:44:07 +01:00
chrchr-github
ca311ebcdf
ASSERT() on calls to Tokenizer::tokenize() in test code ( #3501 )
2021-11-29 07:34:39 +01:00
Rikard Falkeborn
085d25f1b1
SymbolDatabase: Fix valuetype with constexpr and auto ( #3577 )
2021-11-24 16:51:40 +01:00
chrchr-github
a6b8339990
Add test for #10607 ( #3576 )
...
* Add test for #10607
* Format
2021-11-24 14:42:19 +01:00
Daniel Marjamäki
c7ef602cd6
Fixed #9759 (False positive: constParameter on parameter used by non-const call via pointer to member function)
2021-11-21 20:03:38 +01:00
Daniel Marjamäki
921f5c1818
Fixed #10547 (False positive: constVariable, buffer written by stream read)
2021-10-18 19:38:53 +02:00
Paul Fultz II
fc6a791a74
Fix 9766: False positive; suspicious operator is written in declaration ( #3476 )
2021-10-03 09:59:51 +02:00
Daniel Marjamäki
6234e9ddda
Fixed #10483 (FP constParameter with array member and memcpy)
2021-09-15 21:25:16 +02:00
Daniel Marjamäki
6f4ce486a2
Fix FP in constVariable
2021-09-11 20:25:46 +02:00
Daniel Marjamäki
e95395e5f0
Fixed #10397 (FP constParameter - implementing an interface)
2021-08-10 15:37:59 +02:00
Paul Fultz II
7f358b2bed
Format with uncrustify ( #3388 )
2021-08-07 20:51:18 +02:00
chrchr-github
edd86c0b0a
Add regression test for ticket #10374 ( #3386 )
2021-08-06 09:41:26 +02:00
Paul Fultz II
8b8ae55490
Fix 10129: false negative: knownConditionTrueFalse ( #3382 )
...
* Add symbolic matching
* Check for truncated values
* Dont propagate uninit values
* Update errorpath test
* Add test case for 10129
* Add test case for FP
* Remove symbolic values that are the same as the token
* Fix test messages
* Fix cppcheck issue
* Format
2021-08-04 21:07:31 +02:00
Daniel Marjamäki
1ec7397c21
astyle formatting
...
[ci skip]
2021-08-01 14:05:30 +02:00
chrchr-github
9d51b4450b
Add test cases for tickets #9976 and #10371 ( #3364 )
2021-07-27 22:26:19 +02:00
Paul Fultz II
41c94b656a
Fix FP const pointer with class variable and add more tests ( #3345 )
2021-07-21 07:36:13 +02:00
Daniel Marjamäki
fb5ab5e439
constPointer; Improved checking dereferenced pointer is used in calculation/comparison
2021-07-20 10:38:38 +02:00
Daniel Marjamäki
4d23c02320
constPointer; Improved checking when pointer is not dereferenced
2021-07-20 10:28:35 +02:00
Daniel Marjamäki
eb9a251a4c
const variables/parameters; Improved check to handle pointers also (misra 8.13)
2021-07-18 10:59:52 +02:00
Daniel Marjamäki
86f1acc223
overlapping data; use the size value given by size-arg
2021-07-09 13:43:29 +02:00
Daniel Marjamäki
ce58748690
library: add attribute strlen-arg for <not-overlapping-data>
2021-07-09 13:25:01 +02:00
orbitcowboy
3e7b6f262d
std.cfg: Added not-overlapping-data configuration to wmemcpy()
2021-07-08 17:12:53 +02:00
Daniel Marjamäki
6234b5438e
New check: Writing overlapping data, detect undefined behavior
2021-07-05 22:07:41 +02:00
Daniel Marjamäki
1783fd1bba
duplicateBreak; Allow extra return that clarifies for tool(s) that function does not continue
2021-06-29 11:17:12 +02:00
orbitcowboy
df6b0bcd87
#10026 : Added a regression test for 'false negative: duplicateExpression'
2021-05-24 08:54:45 +02:00
Daniel Marjamäki
87554bed7a
Redundant pointer op; Fixed false positives when macro is used
2021-05-22 14:18:29 +02:00
Daniel Marjamäki
a197e94573
Fixed #10266 (False positive; parameter can be const)
2021-05-08 13:40:52 +02:00
Paul Fultz II
31e3e4d87b
Fix issue 10086: false positive: (style) constVariable: Variable 'x' can be declared with const ( #3219 )
2021-04-30 17:47:08 +02:00
Daniel Marjamäki
cf8a423636
Unreachable code; better handling of throw in C code
2021-04-05 04:53:07 +02:00
Daniel Marjamäki
084bc74080
Fixed #8223 (false negative: Statements following return, break, continue, goto or throw will never be executed.)
2021-04-04 19:43:51 +02:00
Daniel Marjamäki
42437277dc
Update Copyright year
2021-03-21 20:58:32 +01:00
PKEuS
141d2ac215
Refactorization: Improved internal implementation of severity and certainty levels
...
Backported from LCppC.
2021-02-24 22:00:06 +01:00
PKEuS
c25b4f1ad6
Fixed false negatives incompleteArrayFill on user defined types (estimate size to determine if it is larger than one byte)
...
Merged from LCppC.
2021-02-24 21:48:26 +01:00
PKEuS
cf1937294a
Refactorization: Removed unnecessary \n and spaces in strings
...
Merged from LCppC.
2021-02-20 12:58:42 +01:00
PKEuS
aa2f143ea6
Fixed false positive: Parameter can be declared with const in constructors did handle noexcept
...
Merged from LCppC.
2021-02-19 08:21:26 +01:00
Paul Fultz II
a6f4fbae54
Fix issue 2741: False negative: redundant assignment of x to itself (ref = x) ( #3071 )
2021-01-22 11:00:57 +01:00
Oliver Stöneberg
ac7647fcd8
some self-check suppression cleanups ( #3032 )
2021-01-09 20:32:38 +01:00
Paul Fultz II
a95c931da0
Fix issue 8501: false negative: (style) Opposite expression on both sides of ( #3012 )
2021-01-05 12:07:27 +01:00
Daniel Marjamäki
bcf6039558
Fixed #10058 (False positive: redundant assignment, there is break)
2020-12-25 09:08:15 +01:00
Paul Fultz II
e12a733ee9
Fix issue 10053: False positive: Same value on both branches of ternary operator ( #2962 )
2020-12-23 13:37:28 +01:00
Paul Fultz II
2541b6034f
Fix issue 10049: False positive: generic reverse valueflow analysis ( #2959 )
2020-12-19 08:28:58 +01:00
Daniel Marjamäki
2cd8ea83a7
Fixed #9860 (unused template not removed properly by default)
2020-11-22 16:43:36 +01:00
Paul Fultz II
4a8a78a925
Fix issue 10002: False positive: constParameter with reference to pointer ( #2918 )
2020-11-22 08:47:24 +01:00
Daniel Marjamäki
6236beeb3f
Fixed #9950 (Wrong severity for redundantAssignInSwitch)
2020-11-15 13:09:28 +01:00
shaneasd
a623168942
fix passedByValueError on enums ( #2869 )
2020-10-30 18:32:35 +01:00
Daniel Marjamäki
f1ce5a9101
Fixed #9929 (False positive: suspicious semicolon after macro)
2020-10-09 20:34:20 +02:00
Daniel Marjamäki
c3517924d0
Clang import testing: Compare AST
2020-10-04 11:27:31 +02:00
Daniel Marjamäki
fe2717fa37
Fixed testrunner
2020-09-29 17:43:53 +02:00
Daniel Marjamäki
d901edd4af
Avoid clarifyCalculation warning for 'x % 16 ? 1 : 0' expression. Fixes FP seen in daca@home. It seems likely that the order is understood otherwise the ternary calculation could easily be simplified away.
2020-09-29 08:39:21 +02:00
Daniel Marjamäki
e32ccb591b
Fixed clarifyCalculation fp for 'a % b ? "a" : "b"'. seen in daca@home.
2020-09-29 08:29:23 +02:00
Daniel Marjamäki
8395522390
Fixed #9919 (False positive: clarifyCalculation for code: flags & ZRL_EOL_NUL ? '\0' : '\n')
2020-09-28 19:18:34 +02:00
Daniel Marjamäki
5578b09452
More fixing for #9914 . New warning id and warning message when variable expression is explicitly hidden.
2020-09-26 13:49:47 +02:00
Daniel Marjamäki
05b0a0f970
Make duplicateAssignExpression warnings inconclusive for 'x&&false' etc. ( #9914 )
2020-09-26 10:50:58 +02:00
Paul Fultz II
887b40e08b
Fix issue 9916: False positive: duplicateAssignExpression when it's checked if variables have initial value later ( #2825 )
2020-09-26 10:31:40 +02:00
Daniel Marjamäki
5856fef83b
Fixed #9914 (False positive: knownArgument for 'x && false')
2020-09-25 20:27:16 +02:00
Daniel Marjamäki
5b78c64420
Fixed testrunner
2020-09-25 20:04:07 +02:00
Daniel Marjamäki
485153c930
Limit variableScope check. Do not check C code if all local variables are declared at function level.
2020-09-25 08:34:47 +02:00
Daniel Marjamäki
801cc8d331
Fixed knownArgument false positive for pointer
2020-09-24 19:48:20 +02:00
Daniel Marjamäki
c08e1a9a94
Fix knownArgument false positive when sizeof is used
2020-09-24 19:43:39 +02:00
Daniel Marjamäki
514b7f4da4
Fixed #9906 (False positive: constParameter (function pointer))
2020-09-23 22:10:47 +02:00
Daniel Marjamäki
107ee57e7a
Fixed #9909 (False positive: knownArgument for calculation 'self->maxsize * sizeof(intptr_t)')
2020-09-21 20:02:55 +02:00
Daniel Marjamäki
730b95331e
Fixed #9905 (False positive: known argument 'header.length()')
2020-09-20 20:17:10 +02:00
Paul
75b955b9c6
Fix issue 9833: False positive: Division by zero when using pointer to struct
2020-09-09 21:29:26 -05:00