Commit Graph

700 Commits

Author SHA1 Message Date
orbitcowboy b201ef26cb
windows.cfg: Improved configuration of OpenThread() (#5653) 2023-11-12 11:37:29 +01:00
orbitcowboy f4df28d5ec
windows.cfg: Improved configuration for OpenProcess(). (#5651) 2023-11-11 14:08:21 +01:00
chrchr-github 83ac6bfa0f
Fix crash when calling estimateSize() (f'up to #12139) (#5628) 2023-11-06 15:22:59 +01:00
chrchr-github 67b61a0ab7
Fix #12134 false negative: passedByValue (#5607) 2023-10-31 19:08:08 +01:00
chrchr-github c2d5aef435
Fix #12083 FN passedByValue with usage in ternary (#5575) 2023-10-31 16:12:38 +01:00
chrchr-github 77bfec4317
Fix #12119 FN constVariablePointer with reassigned pointer (#5592) 2023-10-28 16:48:39 +02:00
orbitcowboy 16c5a11786
posix.cfg: Warn in case the return value of localtime() is ignored. (#5555) 2023-10-14 16:59:42 +02:00
chrchr-github f56677a99d
Fix #11857 FP constParameterReference with std::map (#5551) 2023-10-13 18:08:40 +02:00
orbitcowboy e9c39c124a
windows.cfg: Fix wrong FlushConsoleInputBuffer configuration (#5526)
After flushing, the function returns. Before it was configured to
not-return.
A proper regression test was added.
2023-10-07 20:05:43 +02:00
orbitcowboy 1d30b617c1
windows.cfg: Fixed wrong configuration of GetModuleHandle(A|W)-functions (#5525)
This fixes a FP: `Variable 'path' can be declared as const array
[constVariable]`

The reason was the wrong direction attribute of GetModuleHandle()
2023-10-07 13:59:01 +02:00
Valentin Batz 078e967ab2
qt library: Make Q_PROPERTY a variadic macro to avoid preprocessorErrorDirective (#5370)
Treat Q_PROPERTY as variadic macro to avoid preprocessorErrorDirective
with associative container templates itroducing a "," like for example
`QHash<QString, int>`. Using templates is totally fine in the context of
a moc compiler.

The macro Q_PROPERTY is defined as variadic in
qobjectdefs.h/qtmetaobject.h when not compiling using the moc compiler.

See following references:
* For Qt 5.15
https://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/kernel/qobjectdefs.h?h=5.15#n104
* For Qt 6.6
https://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/kernel/qtmetamacros.h?h=6.6#n5
2023-08-26 00:36:47 +02:00
chrchr-github 725c431ecc
Fix #11881 FP returnStdMoveLocal / Fix FP incorrectStringBooleanError / Support std::string::starts/ends_with() (#5347) 2023-08-21 10:43:54 +02:00
chrchr-github 63811b2993
Fix #11872 FN unusedVariable with multidimensional array (#5334) 2023-08-20 11:08:17 +02:00
chrchr-github 5ea1bca99f
Fix argument direction in windows.cfg, missing Qt macros (#5302) 2023-08-08 22:55:55 +02:00
chrchr-github 73251544a4
Fix #11842 FN constParameterPointer with library function (#5257) 2023-08-05 18:48:43 +02:00
Tobias f10851dc37
posix.cfg: erand48/nrand48/jrand48 fixed argument direction (#5253) 2023-07-27 07:50:46 +02:00
chrchr-github 709fec88f9
Revert "Fix #11765 FN: minsize not checked for string literal, buffer… (#5235)
… access out of bounds not found (#5154)"

This reverts commit 9ad18f51af.
2023-07-11 22:19:01 +02:00
chrchr-github 9ad18f51af
Fix #11765 FN: minsize not checked for string literal, buffer access out of bounds not found (#5154) 2023-07-08 14:46:32 +02:00
Daniel Marjamäki 9a290c959f
Fix #11776 (False positive: uninitialized variable, struct array member initialized in function) (#5165) 2023-06-17 10:20:20 +02:00
Daniel Marjamäki 7840bc4c63 Execute runformat 2023-06-10 17:37:32 +02:00
chrchr-github bd6c5318ad
Detect container action and yield functions (#5117)
* Detect container action and yield functions

* Fix test

* Adapt getUseRetValType() to handle container yield functions
Add TODO

* Handle combined action/yield

* Add Yield::BUFFER

* Remove redundant functions

* Revert "Remove redundant functions"

This reverts commit 4f124a57de5c761ac757ebed83d9f047ef4a1328.

* Add Yield::AT_INDEX

* Add Yield::ITERATOR

* Simplify
2023-06-09 16:03:47 +02:00
chrchr-github ec4267a2bd
Don't suggest const for smartptr::get() (#5126)
* Don't suggest const for smartptr::get()

* Fix test

* Fix merge

* get() doesn't change a smartpointer

* Parentheses
2023-06-07 20:45:48 +02:00
SChernykh 93595aeff0
Fixed `std::vector::data` return type (#5116)
This caused many `arithOperationsOnVoidPointer` false positives in my project which uses `std::vector<uint8_t>` in many places.
2023-06-05 20:47:42 +02:00
chrchr-github f2976e5bb5
std.cfg: add support for smartptr member functions (#5113)
* std.cfg: add support for smartptr member functions

* Fix test

* Fix
2023-06-03 14:36:30 +02:00
chrchr-github 7c56514bd5
Fix #9104 reopened Improve check: missing virtual destructor (#5110)
* Fix #9104 reopened Improve check: missing virtual destructor

* Add support for missing container members

* Add more stuff

* Improve qt.cfg

* Improve wxwidgets.cfg, qt.cfg
2023-06-02 15:24:18 +02:00
chrchr-github cf4334904c
Fix #11626 FN functionConst with non-dereferenceable pointer access (#5074)
* Partial fix for #11626 FN functionConst with non-dereferenceable pointer access

* Fix #11626 FN functionConst with non-dereferenceable pointer access

* Fix test
2023-05-28 19:42:47 +02:00
chrchr-github 78182d4773
Fix FN constVariablePointer (#5076)
* Fix FN constVariablePointer

* Fix FP

* Add const

* Fix tests

* Add const
2023-05-22 19:53:51 +02:00
chrchr-github e621f721fc
Use library to get deallocation function (#5061)
* Use library to get deallocation function

* Add suppressions

* Amend

* Remove suppression

* More getDeallocFuncInfo()

* Fix suppressions

* Fix suppression
2023-05-21 14:01:14 +02:00
Oliver Stöneberg b3016f01a1
fixed some CLion inspection warnings (#4688)
* fixed some CLion "Unused global declaration" warnings

* fixed some CLion "Not implemented function" warnings

* fixed some CLion "Unused struct" warnings

* added TODO

* removed unused parameter reported by CLion

* fixed some CLion "Unused macro" warnings

* fixed some CLion "Condition is always true" warnings and a CLion "The value is never used" warning
2023-04-28 16:02:41 +02:00
Paul Fultz II 93b4de36cd
Update constVariable IDs for references and pointers (#4904) 2023-04-07 20:14:53 +02:00
ericLemanissier cf280f84d4
qt: fix Q_UNUSED macro defintion (#4925) 2023-04-01 16:33:50 +02:00
Oliver Stöneberg 30131837b5
refs #11603 - deprecated `--enable=information` implicitly enabling `missingInclude` (#4865) 2023-03-09 20:04:20 +01:00
Mateusz Michalak 2d5cabed4b
Add std::*begin and std::*end cfg (#4796) 2023-03-09 17:06:53 +01:00
Daniel Marjamäki 3658965912 runformat 2023-03-07 17:57:51 +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 514e605598
CI-unixish.yml: fixed and enabled all `build` steps for macos (#4832) 2023-03-02 20:54:30 +01:00
chrchr-github a0cc35e3fa
Remove simplifyQtSignalsSlots(), update qt.cfg (#4807) 2023-02-25 15:58:57 +01:00
Daniel Marjamäki af44659e06 runformat 2023-02-25 10:23:45 +01:00
Oliver Stöneberg da09a92b0a
test/cfg: enabled `information` and `--inconclusive` in all cases / some cleanups (#4784) 2023-02-24 21:37:56 +01:00
Oliver Stöneberg 8c527bf132
std.cfg: added support for more container methods (#4780)
* std.cfg: added support for `std::unordered_map::count()`

* std.cfg: added support for `std::multimap::count()`

* std.cfg: added support for `std::unordered_map::insert()`

* std.cfg: added support for `std::unordered_set::insert()`

* std.cfg: added support for `std::unordered_set::emplace()`
2023-02-11 10:48:17 +01:00
chrchr-github 0dddba3bd6
Fix cfg for std::xstream::write() (#4778) 2023-02-08 08:59:13 +01:00
chrchr-github d8323c367e
std.cfg: use-retval for container member functions (#4766) 2023-02-06 22:03:23 +01:00
Mateusz 7ae7ad60d8
Added cfg information about std::span (#4762)
* Added cfg information about std::span

* Add tests for span handling

* Add details about functions and tests fo std::span

* Add tests in dangingLifetimeContainerView for span

* Reduce c++ version from 20 to 2a

* Add checking if span is supported in std lib cfg checks
2023-02-05 18:10:08 +01:00
chrchr-github 3ccc0adbca
Fix #11182 checkLibraryFunction with overloaded method / #11198 inconsistent reporting of checkLibraryNoReturn (#4740) 2023-01-26 22:29:49 +01:00
Oliver Stöneberg fd15811215
de-coupled `--check-library` from `information` severity and other dependencies (#3861) 2023-01-26 22:28:04 +01:00
chrchr-github 7945b835e1
Add support for std::string_view::substr() (#4729) 2023-01-20 15:46:06 +01:00
chrchr-github f8f66aeea9
Improve std.cfg: std::addressof(), std::stringstream::str() (#4710)
* Improve std.cfg: std::addressof(), std::stringstream::str()

* Format

* Add <leak-ignore/>
2023-01-16 22:08:31 +01:00
chrchr-github b29f111082
Improve qt.cfg: unreadVariable for macro parameter (#4683) 2023-01-07 23:29:47 +01:00
orbitcowboy 3136a50b97 Formatting [ci skip] 2022-12-22 11:59:10 +01:00
orbitcowboy 347c10db3b posix.cfg: Improved configuration of mq_timedsend(). 2022-12-22 11:58:32 +01:00