Commit Graph

137 Commits

Author SHA1 Message Date
Oliver Stöneberg 2935c855c3
reduced usage of mutable `Settings` objects in tests () 2023-05-02 11:48:24 +02:00
Daniel Marjamäki 464fbe8d53 Update copyright year 2023-01-28 10:16:34 +01:00
Oliver Stöneberg 1d3955bd92
renamed some files in the `test` folder () 2023-01-27 08:18:32 +01:00
chrchr-github ccf2176664
Fix FP constStatement with lambda ()
* Update tokenlist.cpp

* Update testincompletestatement.cpp

* Fix  FP constStatement with lambda

* Format
2022-11-01 11:50:08 +01:00
chrchr-github 515369739c
Fix FP constStatement for function-local struct definition+initialization statement () 2022-10-22 00:27:19 +02:00
chrchr-github bb2ba53bf5
Add tests for , ()
* Add test for 

* Add test for 
2022-09-22 19:41:29 +02:00
Oliver Stöneberg b3ec225480
iwyu.yml: use `debian:unstable` to always get latest include-what-you-use / cleaned up includes ()
* 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
chrchr-github d1386a842a
Fix debug: constStatementError not handled. ()
* Fix  debug: constStatementError not handled.

* Use function
2022-09-14 23:57:02 +02:00
Oliver Stöneberg 1b4141cbe5
added more missing `sstream` includes () 2022-08-19 18:23:15 +02:00
chrchr-github 3dc2c0bd42
Fix FN constStatement with misused comma () 2022-08-16 22:10:58 +02:00
chrchr-github a62c3ea90e
Fix Broken AST with auto**, FP constStatement () 2022-08-03 19:03:38 +02:00
chrchr-github 71f9a7269f
Add test for , , avoid duplicate warning ()
* Add test for , avoid duplicate warning

* Add test for 

* Fix test
2022-08-02 21:43:18 +02:00
chrchr-github 2223cd24b9
Fix FN: leakNoVarFunctionCall (switch condition) ()
* Fix  FN: leakNoVarFunctionCall

* Fix TODO

* Fix  FN: leakNoVarFunctionCall (if ( b && malloc ) )

*  FN: leakNoVarFunctionCall (ternary operator)

* Fix  FN: leakNoVarFunctionCall (switch condition)

* Fix FN constStatement

* Fix FP leakNoVarFunctionCall
2022-06-28 14:02:02 +02:00
chrchr-github 6f5a5fd947
Add some tests ()
* Add test for 

* Add test for 

* Fix test

* Add test for 

* Add test for 

* Add test for 

* Format

* Format

* Fix test

* Remove duplicate test

* Add valueflow test

* Rebuild
2022-06-14 09:54:45 +02:00
chrchr-github 52453947c8
Don't warn for 'x | 0' in macro ()
* Fix  FN badBitmaskCheck for binary or with 0

* Add test for 

* Don't warn for 'x | 0' in macro

* Add test for 
2022-06-06 11:17:36 +02:00
chrchr-github 52f507d1fb
Fix unintentional semicolon in expression '.. ; +dostuff();' ()
* Fix  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 ceb86afc22
Fix FP constStatement with cast in return () 2022-04-07 14:11:14 +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
chrchr-github 4bf8718dcb
Fix FP constStatement with pointers in lambda () 2022-04-01 19:50:40 +02:00
chrchr-github 183969cd4b
Fix FP constStatement with extern declaration () 2022-03-31 21:08:04 +02:00
chrchr-github c85e7e7d2f
Fix FP constStatement with more complex expression () 2022-03-30 22:00:57 +02:00
chrchr-github 343a23135d
Fix FP constStatement with reference and direct initialization () 2022-03-30 19:22:01 +02:00
chrchr-github 86ff360946
Fix FP constStatement with immediately evaluated lambda () 2022-03-29 06:10:57 +02:00
chrchr-github 49147f95fe
Fix FP constStatement with dynamic_cast () 2022-03-28 22:15:40 +02:00
chrchr-github 8d49fc252c
Fix FP constStatement ',' with Eigen, OpenCV etc. () 2022-03-28 22:06:44 +02:00
chrchr-github d57d536f01
Fix FP constStatement with negation and cast () 2022-03-28 21:52:08 +02:00
chrchr-github 63d96e49fc
Fix , FP constStatement ()
* Fix ,  FP constStatement

* Fix test cases (first one did not compile)
2022-03-27 07:59:29 +02:00
chrchr-github fe7d0eeffc
Fix FP: constStatement with template type () 2022-03-25 17:03:54 +01:00
chrchr-github e54ad24d2c
Fix FN constStatement with arrays () 2022-03-25 11:32:16 +01:00
chrchr-github 3630e9c49d
Fix FP constStatement with extra parentheses in declaration () 2022-03-24 22:07:21 +01:00
chrchr-github 0d2af9a5b7
Fix FP constStatement with init list in function call () 2022-03-23 18:10:33 +01:00
chrchr-github 40c2687ac4
Fix FP constStatement with delete () 2022-03-22 18:39:02 +01:00
chrchr-github 97ce569859
Fix FP constStatement with extra parentheses in function call ()
* Fix  FP constStatement with extra parentheses in function call

* Format
2022-03-17 12:47:27 +01:00
chrchr-github b8ba0ae00e
Fix FP constStatement with ternary and comma operator () 2022-03-16 15:28:59 +01:00
chrchr-github d3d40fd599
Fix #10868/#10869 FN: constStatement, handle unused character constants ()
* Fix  FN: constStatement, handle unused character constants

* simpleMatch

* Fix  FN: constStatement

* Format
2022-03-14 14:14:32 +01:00
chrchr-github 3df170c191
Fix FN: constStatementError, streamline error messages () 2022-03-12 14:52:18 +01:00
chrchr-github 705931266c
constStatementError: don't warn for casts with possible side effects,… ()
* constStatementError: don't warn for casts with possible side effects, handle bool constants

* Recursive call, add tests

* Restore test

* Don't warn for C++ casts to void

* Don't warn for cast to void*
2022-03-11 21:45:51 +01:00
chrchr-github 850ad0fed9
: Add error message for unused casts, log unhandled errors ()
* : Add error message for unused casts, log unhandled errors

* Fix TODO

* Fix TODO
2022-03-09 18:21:47 +01:00
Oliver Stöneberg f32583e097
removed OVERRIDE and FINAL defines and use the keywords directly () 2022-02-10 23:02:24 +01:00
Daniel Marjamäki 3989408738 Update copyright year 2022-02-05 11:45:17 +01:00
chrchr-github dad64bfcc8
Fix FP shadowFunction with default destructor implementation / Tests for , , , , () 2022-02-02 19:30:49 +01:00
Oliver Stöneberg 171da2e6f9
avoid dependency on transitive includes - based on include-what-you-use () 2022-01-27 19:03:20 +01:00
Paul Fultz II 7f358b2bed
Format with uncrustify () 2021-08-07 20:51:18 +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 cf1937294a Refactorization: Removed unnecessary \n and spaces in strings
Merged from LCppC.
2021-02-20 12:58:42 +01:00
Daniel Marjamäki bf3833dad5 Avoid constStatement false positives for 'foo() || x=5'. Found in daca@home. 2020-09-29 13:35:39 +02:00
Daniel Marjamäki 31c800e19e Fixed false positive: suspicious operator ',' seen in daca@home 2020-09-29 11:32:48 +02:00
Daniel Marjamäki 37245a8179 Update copyright year 2020-06-13 16:37:12 +02:00
PKEuS c9d8f607df Optimization: Reduced peak memory usage (30% in my test case) by immediately deleting simplecpp::TokenList while creating the cppcheck TokenList. 2020-05-19 12:08:17 +02:00