Commit Graph

683 Commits

Author SHA1 Message Date
Oliver Stöneberg 2935c855c3
reduced usage of mutable `Settings` objects in tests (#4798) 2023-05-02 11:48:24 +02:00
chrchr-github 6e5375f7b7
Add tests for #8075, #11608, #11635 (#4995)
* Add tests for #6925, #11042, #11494

* Format

* Add tests for # 6561, #6619, #7475,

* Add tests for #8075, #11608, #11635
2023-04-21 16:09:52 +02:00
chrchr-github 938ad990f5
Add tests for #6925, #11042, #11494 (#4987)
* Add tests for #6925, #11042, #11494

* Format
2023-04-19 21:19:45 +02:00
Oliver Stöneberg 5be8eee943
iwyu.yml: use a distro which has the latest `include-what-you-use` / enabled Qt mappings / cleaned up includes (#4885) 2023-04-08 16:08:47 +02:00
Paul Fultz II edfdfe658a
Fix 11651: FP negativeIndex with for loop (#4934) 2023-04-05 11:05:29 +02:00
Oliver Stöneberg e2f38fdaf3
removed `experimental` and `safe` from `Certainty` (#4819) 2023-03-12 14:15:29 +01:00
Oliver Stöneberg 50eb0641b9
iwyu.yml: added `clang-include-cleaner` job / cleaned up includes based on `include-what-you-use` (#4844) 2023-03-04 08:53:19 +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 8f5f06add7
some `Tokenizer` construction and related other cleanups (#4799) 2023-03-02 21:48:14 +01:00
chrchr-github 51c5a79150
Fix #11586 FP ctuArrayIndex with unknown typedef (#4831) 2023-03-02 21:19:53 +01:00
Oliver Stöneberg 3ec4da0f8a
improved library loading in tests (#4806) 2023-03-02 21:10:51 +01:00
Oliver Stöneberg 7c7ccdf7c0
Check: disallow more than one instance per check (#4749) 2023-01-29 17:23:03 +01: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 (#4705) 2023-01-27 08:18:32 +01:00
chrchr-github a0f51d1e21
Improve <type-checks><unusedvar> error message (#4735) 2023-01-26 22:18:55 +01:00
chrchr-github 7515305581
Add test for #10413 (#4687) 2023-01-18 17:30:22 +01:00
Paul Fultz II 6020feb271
Fix 11461: arrayIndexOutOfBounds false positive (#4686) 2023-01-07 22:09:17 +01:00
Paul Fultz II b4d455df48
Fix 11349: FP negativeIndex for clamped array index (#4627)
* Fix 11349: FP negativeIndex for clamped array index

* Format

* Use emplace_back

* Use default constructor
2022-12-13 07:50:01 +01:00
chrchr-github 68acd77053
Fix #11361 FP ctuPointerArith with unknown buffer size (#4591) 2022-11-23 19:11:47 +01:00
chrchr-github 5a8e55c083
Fix #11355 FN: arrayIndexOutOfBounds (#4555)
* Fix  #11355 FN: arrayIndexOutOfBounds

* Fix
2022-10-18 07:24:24 +02:00
chrchr-github 33fde8ae6b
Add tests for #1770, #10130 (#4519)
* 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

* Add tests for #1770, #10130
2022-09-29 12:33:34 +02:00
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
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 32d96104d6
Fix 6370: ValueFlow: array element with known value (#4447)
* Fix 6370: ValueFlow: array element with known value

* Format

* Move comment
2022-09-07 19:16:07 +02:00
chrchr-github 79daad8ff4
Fix #11020 FP arrayIndexOutOfBounds if string literals are assigned conditionally (#4428) 2022-09-01 22:59:46 +02:00
chrchr-github 5804cc44e7
Fix FP bufferAccessOutOfBounds (#4427)
* Fix FN with buffer size 1

* Fix FP bufferAccessOutOfBounds
2022-08-31 19:31:37 +02:00
chrchr-github df704361f6
Fix FN with buffer size 1 (#4410) 2022-08-29 12:24:44 +02:00
chrchr-github 7156afe003
Fix #5140 FN (error) buffer access out of bounds - known argument (#4402)
* Fix #5140 FN (error) buffer access out of bounds - known argument const char* argv[]

* Format
2022-08-26 17:27:54 +02:00
chrchr-github 456c6b410e
Fix #2304 FN known strcpy parameter (#4396)
* Fix #2304 FN known strcpy parameter

* Parentheses

* Format
2022-08-24 21:23:45 +02:00
chrchr-github 2ab8de2650
Fix #11145 FP negativeMemoryAllocationSize with possible value (#4387) 2022-08-20 07:56:31 +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 5b4c6c1e73
Fix #11026 FP pointerOutOfBounds with strlen() (#4366) 2022-08-17 09:45:07 +02:00
chrchr-github 0d72216cca
Fix BufferOverrun TODO (#4300)
* Fix BufferOverrun TODO

* clang-tidy
2022-07-22 07:24:34 +02:00
chrchr-github 6eab3cb8bd
Fix #9788 ctu: false negative array index out of bounds for array arguments (#4277) 2022-07-13 21:08:51 +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
chrchr-github 89a9e5ecc6
Fix #9944 FP: terminateStrncpy doesn't account for size check (#4252)
* Fix #9944 FP: terminateStrncpy doesn't account for size check

* Fix container size check

* Undo

* Format

* Rebuild

* Rebuild
2022-07-08 12:35:21 +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
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 9cecc8468e
Fix 10570: Improve check; condition then pointer dereference, different pointers (#4216)
* Try to use after assign in loop

* Update valueflow forward to handle init tokens

* Fix tests

* Make test TODO

* Format

* Add tests

* Format

* Fix ubsan error

* Use simpleMatch
2022-06-16 19:26:23 +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 de9b65c737
Add tests for #9194, #10415, #4759, #9876, #10006 (#4213)
* 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

* Add tests for #9194, #10415, #4759, #9876, #10006
2022-06-14 13:05:07 +02:00
Paul Fultz II bd63534a1c
Fix 10740: valueflow; conditional value. incremented value is oob. (#4208) 2022-06-12 07:16:28 +02:00
PKEuS 82af702c6f
LCppC backport: Restored Check: Detect negative VLA and allocation (new[]) sizes (#4187) 2022-06-11 09:55:38 +02:00
chrchr-github 2b611709e2
Add test for #11066 (#4136) 2022-05-25 23:28:54 +02:00
Paul Fultz II 5d8da2b83c
Fix 11035: FP arrayIndexOutOfBoundsCond with array and vector (#4105)
* Fix 11035: FP arrayIndexOutOfBoundsCond with array and vector

* Format

* Move comment
2022-05-12 06:21:33 +02:00
chrchr-github a70d11adb6
Fix #11052 inline static global struct declaration interferes with checks (#4098) 2022-05-10 20:43:11 +02:00
chrchr-github 6a914dc435
Add tests for # 10773, #108787, #8991 (#4063)
* Add test for #10773

* Add test for #10878

* Add test for #8991
2022-04-30 08:20:00 +02:00
chrchr-github bcbc29affb
Fix #10526 FP: negativeIndex if function call is made after index check (#4052)
* Fix #10526 FP: negativeIndex if function call is made after index check

* Improve container check

* Format
2022-04-27 14:08:44 +02:00
chrchr-github 6450d5701c
Fix #10979 FP arrayIndexOutOfBoundsCond with sizeof (#4021)
* Fix #10466 FP constVariable with pointer typedef

* Fix flag check

* Use isStatic()

* Fix #10979 FP arrayIndexOutOfBoundsCond with sizeof and extra parentheses
2022-04-14 18:13:29 +02:00