Daniel Marjamäki
aa73427699
cleanup ctu-info when project import is used
2023-04-06 20:17:19 +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
chrchr-github
8043930a0f
Fix FN uninitMemberVar with std::array ( #4935 )
2023-04-06 18:45:12 +02:00
chrchr-github
1b00a0f06a
Fix #9279 Missing --check-library warning when memory leaks check assumes function is noreturn ( #4937 )
...
* Fix #9279 Missing --check-library warning when memory leaks check assumes function is noreturn
* Format
* Fix check, add tests
* Format
2023-04-06 18:44:03 +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
chrchr-github
0f47948bf4
Fix #11577 FN unusedStructMember when casting address (regression) ( #4816 )
2023-04-04 21:57:09 +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
d5e2ee411e
Fix 11578: FP accessMoved with range-based for loop ( #4931 )
...
* Fix 11578: FP accessMoved with range-based for loop
* Format
2023-04-03 19:44:47 +02:00
chrchr-github
86efca28a3
Fix crash in constPointer() ( #4932 )
...
* Fix crash in constPointer()
* Format
2023-04-03 19:44:08 +02:00
chrchr-github
b2b0962067
Fix #11629 debug: Scope::checkVariable found variable 'np' with varid 0. ( #4915 )
2023-04-03 15:41:19 +02:00
chrchr-github
a336048d14
Fix #11599 false negative: constParameter ( #4902 )
...
* Partial fix for #11599 false negative: constParameter
* Adjust test
* Update testother.cpp
* Update testother.cpp
* Fix #11599 false negative: constParameter
* Fix new warnings
* Format
* Add difference_type
* Remove isAliased()
* Undo
* Adjust test
* Add test
* Improve const check
* Tweak constness, add tests
* Add tests
* Use new helper function, fixtest
* Remove bailout, fix check for cast
* Prevent FP
* Fix constVariable check, add tests
* Format
* Format
* Add test for #11632
2023-04-02 20:36:23 +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
chrchr-github
7503aca0e2
Fix #11621 FP functionConst when assigning init list ( #4895 )
...
* Fix #11621 FP functionConst when assigning init list
* Add comment
* Merge
2023-04-01 18:54:26 +02:00
chrchr-github
01a22159b8
Fix autoNoType with std::begin() / function returning smart ptr ( #4919 )
...
* Fix autoNoType with std::begin()
* Suppress warning for const lambda
* Fix autoNoType with function returning smart ptr
* Handle more complex expression
* Fix scope with auto and smart ptr
* Handle smart pointers and iterators first
2023-04-01 09:38:40 +02:00
chrchr-github
89ec148199
Partial fix for #11638 Library::getFunctionName: SIGSEGV ( #4920 )
...
* Partial fix for #11638 Library::getFunctionName: SIGSEGV
* Fix test
* simpleMatch()
2023-03-30 07:25:26 +02:00
chrchr-github
4d72e0f5b5
Fix #11625 FP constVariable when returning by reference ( #4921 )
2023-03-30 07:24:36 +02:00
chrchr-github
3836367d95
Fix FN passedByValue with array access, range-based for ( #4922 )
...
* Fix FN passedByValue with array access, range-based for
* Format
* Fix/suppress new warnings
2023-03-30 07:24:23 +02:00
chrchr-github
fc24f760cc
Fix #11627 Infinite loop in ReverseTraversal ( #4916 )
2023-03-30 07:22:41 +02:00
chrchr-github
13e12da08f
Fix #11639 findGarbageCode(): SIGSEGV ( #4917 )
2023-03-28 11:24:52 +02:00
chrchr-github
7bf6b359b1
Fix #11616 false negative: functionConst ( #4887 )
2023-03-27 17:54:19 +02:00
chrchr-github
5791561a45
Partial fix for #11543 checkLibraryFunction warning for smartpointer in container ( #4900 )
2023-03-27 17:50:33 +02:00
Daniel Marjamäki
c79d859f8b
Tokenizer::simplifyTypedef: new faster simplification.
...
It performs a more "lightweight" simplification of global typedefs that are not shadowed.
If a "heavy" simplification is needed that will be executed afterwards.
2023-03-26 17:16:45 +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
Paul Fultz II
d4b030694b
Move some checks for variable changed from constVariable check to isVariableChanged ( #4905 )
2023-03-21 18:16:40 +01:00
chrchr-github
0d02c0a1a7
Fix #11624 FP uninitvar with array passed to function ( #4903 )
2023-03-20 19:54:31 +01:00
chrchr-github
6316479782
Fix FP unusedStructMember with std::map ( #4899 )
2023-03-20 19:40:57 +01:00
chrchr-github
3d965b5b81
Fix #11618 FP functionConst with call to static function ( #4898 )
2023-03-20 19:29:49 +01:00
chrchr-github
19eef2c584
Partial fix for #11599 false negative: constParameter ( #4901 )
2023-03-19 17:43:23 +01:00
chrchr-github
3b61ecd973
Fix FP missingOverride ( #4894 )
2023-03-18 16:39:45 +01:00
chrchr-github
716fcc5e96
Fix crash in valueFlowForwardLifetime() ( #4891 )
2023-03-18 14:53:49 +01:00
chrchr-github
319baf8d0f
No WRONG_DATA for function pointer with unknown return type ( #4893 )
2023-03-18 14:52:29 +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
Daniel Marjamäki
a4d2178f3c
Fix ctuuninitvar false positive for struct that is partly initialized
2023-03-13 20:55:11 +01:00
chrchr-github
322a1a5e8c
Partial fix for #11378 internalAstError regressions (iscpp11init) ( #4889 )
2023-03-13 16:30:27 +01:00
chrchr-github
a6c5bb28c1
Fix crash in LoopAnalyzer ( #4888 )
2023-03-13 15:44:34 +01:00
Paul Fultz II
61e8b84578
Fix 11610: false negative: knownConditionTrueFalse with address of variable ( #4883 )
2023-03-12 19:57:11 +01:00
chrchr-github
a75392307f
Partial fix for #11604 : no DacaWrongData for function pointer ( #4867 )
2023-03-12 15:49:37 +01:00
chrchr-github
e2b2fc2684
Fix #10946 Debug warning: autoNoType with lambda ( #4824 )
2023-03-12 15:48:20 +01:00
chrchr-github
980c92d19d
Partial fix for #11378 internalAstError regressions (iscpp11init) ( #4884 )
2023-03-12 15:39:02 +01:00
Oliver Stöneberg
e2f38fdaf3
removed `experimental` and `safe` from `Certainty` ( #4819 )
2023-03-12 14:15:29 +01:00
chrchr-github
9ed21fb917
Fix #11513 FN functionConst with comparison as argument ( #4738 )
2023-03-12 11:39:18 +01:00
chrchr-github
809430631f
Partial fix for #11611 FP constStatement with typedef and unknown macro ( #4881 )
2023-03-12 11:13:58 +01:00
chrchr-github
7881b99547
Fix #10259 debug: SymbolDatabase couldn't resolve all user defined types ( #4879 )
2023-03-10 19:04:46 +01:00
Daniel Marjamäki
f4b32d74c7
dump: update <TemplateSimplifier> info in dump file
2023-03-09 21:58:33 +01:00