Paul Fultz II
ac14fd218b
ValueFlow: Infer possible symbolic values ( #4947 )
2023-04-10 19:27:29 +02:00
Daniel Marjamäki
7726a5b5b3
Add a --check-level option ( #4942 )
2023-04-09 13:48:13 +02:00
Daniel Marjamäki
89a95ddc8f
--performance-valueflow-max-if-count: review comments
2023-04-08 13:07:28 +02:00
Oliver Stöneberg
39f94f32f9
valueflow.cpp: fixed selfcheck suppression ( #4940 )
2023-04-08 12:15:16 +02:00
chrchr-github
ab24e3a3c8
Fix remaining example from #11599 , FN #11646 , fix crash ( #4929 )
...
* Fix remainig example from #11599
* Fix FP, new warnings
* More warnings
* Use getTokenArgumentFunction()
* Fix crash
* Fix #11646 constParameter not reported with "const * const" parameter
* Fix test
* Fix new warnings
* Add suppression
* Add const, fix suppression
2023-04-06 18:46:45 +02:00
Paul Fultz II
e22a740f0c
Fix 11647: FN knownConditionTrueFalse with strings of same length ( #4936 )
...
* Fix 11647: FN knownConditionTrueFalse with strings of same length
* Format
* Remove extra size
* Use simpleMatch
2023-04-06 18:42:24 +02:00
Paul Fultz II
edfdfe658a
Fix 11651: FP negativeIndex with for loop ( #4934 )
2023-04-05 11:05:29 +02:00
Paul Fultz II
115f17cfe6
ValueFlow: Improve the starting point for uninitialized variables to find more uninitialized usages after many conditionals ( #4930 )
2023-04-04 21:55:09 +02:00
Paul Fultz II
634f5e254f
Fix 11512: FN containerOutOfBounds when empty vector is returned ( #4928 )
2023-04-02 11:58:04 +02:00
Daniel Marjamäki
2359b9ff82
valueflow: limit valueflow in functions that have many ifs
2023-04-01 20:58:15 +02:00
Paul Fultz II
7231d1cece
Update the isVariableChanged to correctly check the const bit ( #4912 )
2023-03-26 15:12:49 +02:00
Paul Fultz II
fd8a7b9537
ValueFlow: Evaluate if statement for function returns ( #4908 )
2023-03-24 13:31:26 +01:00
Paul Fultz II
cd21f55cdf
Fix 11630 and 11620 lifetime issues ( #4913 )
2023-03-24 13:29:43 +01:00
Paul Fultz II
e1a4a18528
Fix 11609: False positive: Returning iterator to local container 'k' that will be invalid when returning where 'k' is an iterator. ( #4907 )
2023-03-21 23:18:01 +01:00
chrchr-github
716fcc5e96
Fix crash in valueFlowForwardLifetime() ( #4891 )
2023-03-18 14:53:49 +01:00
chrchr-github
3ccd0505cd
Enable and mitigate readability-simplify-boolean-expr ( #4897 )
2023-03-17 13:51:55 +01:00
Paul Fultz II
8324caf8b9
Fix 11557: FP derefInvalidIteratorRedundantCheck in and/or condition ( #4892 )
2023-03-16 15:00:27 +01:00
Paul Fultz II
61e8b84578
Fix 11610: false negative: knownConditionTrueFalse with address of variable ( #4883 )
2023-03-12 19:57:11 +01:00
Mateusz Michalak
2d5cabed4b
Add std::*begin and std::*end cfg ( #4796 )
2023-03-09 17:06:53 +01:00
Oliver Stöneberg
00fd3d92c6
made `ForwardTraversal::mSettings` and `ReverseTraversal::mSettings` references / adjusted some calling code to use references as well ( #4858 )
2023-03-07 12:26:17 +01:00
Oliver Stöneberg
20db3ff368
SymbolDatabase: made `mTokenizer` and `mSettings` references ( #4857 )
2023-03-07 12:22:06 +01:00
Oliver Stöneberg
5af6ca6637
made `Platform` a member of `Settings` instead of inheriting from it / cleanups ( #4791 )
2023-03-03 18:36:27 +01:00
Oliver Stöneberg
8023eff7c0
removed `TokenList::getSettings()` and replaced usage in ValueFlow with provided settings ( #4843 )
2023-03-03 18:31:38 +01:00
Oliver Stöneberg
b70e1d5461
avoid some unchecked pointer dereferences ( #4811 )
2023-03-02 22:05:41 +01:00
Oliver Stöneberg
bd1ae69b00
cleaned up includes based on `include-what-you-use` ( #4599 )
2023-03-02 21:50:14 +01:00
Oliver Stöneberg
dac578e8b9
ValueFlow: avoid unnecessary `Value` copies ( #4835 )
2023-03-02 21:46:23 +01:00
chrchr-github
491299048b
Amend fix for #11449 Function call not recognized ( #4838 )
2023-03-02 21:45:15 +01:00
Oliver Stöneberg
e99d7c6531
fixed some `-Wdeprecated-copy-dtor` Clang compiler warnings ( #4836 )
2023-03-02 21:02:29 +01:00
Daniel Marjamäki
e5a22e3436
Revert "improved `Path` handling of mixed separators ( #4808 )"
...
This reverts commit 0797867758
.
2023-02-24 06:21:02 +01:00
chrchr-github
96887c8130
Fix #11561 FN nullPointer with unnamed parameter ( #4805 )
2023-02-23 22:56:03 +01:00
Oliver Stöneberg
0797867758
improved `Path` handling of mixed separators ( #4808 )
2023-02-23 22:34:05 +01:00
Paul Fultz II
346ecdb53a
Improve valueflow after pushing to container ( #4803 )
2023-02-23 18:05:31 +01:00
Paul Fultz II
91d2526c41
Fix reverse analysis when modifying variable with function ( #4800 )
2023-02-23 18:04:16 +01:00
Mateusz Michalak
9b62caf0ef
Fix FP#11508 ( #4774 )
...
* Add tests to cover the issue
* Set lifetime of pointer to data passed as view to SubFunction
* Move isContainerOfPointers to separate function
* Revert "Set lifetime of pointer to data passed as view to SubFunction"
This reverts commit 30dafe23e40354606776d2573653608025cae754.
* Skip propagating lifetime of iterators/pointers for views
* Add indents to test cases
* Skip all non-local values in container view lifetime
2023-02-18 17:38:51 +01:00
chrchr-github
ff0eee4d77
Fix #11558 FP knownConditionTrueFalse when checking for zero character ( #4794 )
...
* Fix #11558 FP knownConditionTrueFalse when checking for zero characte
* Fix test
* Set impossible value only for non-Boolean conditions, rename
* Fix condition
2023-02-18 17:35:12 +01:00
Paul Fultz II
2b9af94b9a
Fix 11548: FP knownConditionTrueFalse with empty() == false ( #4788 )
...
* Fix 11548: FP knownConditionTrueFalse with empty() == false
* Format
* Fix test
2023-02-11 10:42:13 +01:00
Oliver Stöneberg
f7a415dbf3
Token: do not return non-`const` pointer from `const` methods - part 1 ( #4761 )
2023-02-08 21:07:16 +01:00
chrchr-github
4f915499d4
Fix #11091 FP: Using object that is a temporary ( #4754 )
2023-02-06 22:04:27 +01:00
Oliver Stöneberg
afd13ea11d
ValueFlow: some interface and namespace cleanups ( #4746 )
2023-01-28 10:20:47 +01:00
Daniel Marjamäki
464fbe8d53
Update copyright year
2023-01-28 10:16:34 +01:00
Oliver Stöneberg
bea6aec2b2
extracted `ValueFlow::Value` to `vfvalue.{cpp|h}` ( #4642 )
2023-01-26 22:23:22 +01:00
chrchr-github
3076f9def1
Fix #11449 Function call not recognized with extra parentheses / FP nullPointer ( #4703 )
2023-01-18 20:38:37 +01:00
Armin Müller
a77f0d9403
Typos found by running "codespell" ( #4702 )
2023-01-10 15:15:27 +01:00
Paul Fultz II
cefc105c5f
Fix 11468: false positive danglingTempReference warning ( #4679 )
2023-01-07 23:44:22 +01:00
Paul Fultz II
6020feb271
Fix 11461: arrayIndexOutOfBounds false positive ( #4686 )
2023-01-07 22:09:17 +01:00
Paul Fultz II
a338be4682
Add source traces when using LifetimeStore ( #4678 )
2023-01-03 22:02:48 +01:00
chrchr-github
11f1a9d1f5
Fix crash on ternary with omitted operand ( #4673 )
...
* Fix MSVC compiler warning
* Fix crash on incomplete ternary operator
* Revert "Fix crash on incomplete ternary operator"
This reverts commit 28df0f0ab6ff794e733617447f847a97c1a7a609.
* Handle ternary with omitted operand
2023-01-02 17:44:17 +01:00
Oliver Stöneberg
71cdacdc97
fixed missing location for `valueFlowMaxIterations` debug warning / also added it to daca server overview ( #4664 )
2022-12-30 21:20:00 +01:00
Oliver Stöneberg
1cfe49e340
use `const_iterator` where possible ( #4662 )
2022-12-30 15:13:47 +01:00
Oliver Stöneberg
b380fd2589
added command-line option `--valueflow-max-iterations` to control amount of valueflow iterations / also log debug warning when iterations are being exceeded ( #4557 )
2022-12-20 20:51:08 +01:00