Commit Graph

27346 Commits

Author SHA1 Message Date
Daniel Marjamäki 22e67d3534
Fixed #10442 (AST: wrong ast of ({}) in struct initialization) (#5135) 2023-06-09 22:31:14 +02:00
orbitcowboy 6ea88c2758
Added test case from #8302 (#5138)
* Added test case from #8302 and a TODO

* Check with in C++ mode to get rid of TODO.

* Updated expected error message text

* Updated expected error message text
2023-06-09 21:46:45 +02:00
chrchr f5c61bebef Simplify 2023-06-09 18:21:26 +02:00
Daniel Marjamäki a62fedc641
GUI: Do not use --rule-texts in cppcheck premium (#5136) 2023-06-09 17:15:48 +02:00
chrchr-github 2da453fdc9 Update library.cpp 2023-06-09 16:53:23 +02:00
chrchr-github 127a66d291 Move to size category 2023-06-09 16:53:23 +02:00
chrchr e5616c7c00 Undo 2023-06-09 16:53:23 +02:00
chrchr 006a323caa Format 2023-06-09 16:53:23 +02:00
chrchr f17f03befa C++11 sucks 2023-06-09 16:53:23 +02:00
chrchr 55a279fade Fix compilation 2023-06-09 16:53:23 +02:00
chrchr 68a59830a4 Fix returnValueType() 2023-06-09 16:53:23 +02:00
chrchr 55f34e2681 Extend XML schema 2023-06-09 16:53:23 +02:00
chrchr-github 022fcb3be1 Handle const, noreturn, return type 2023-06-09 16:53:23 +02:00
chrchr-github 220ad27fa8 Add Yield::ITERATOR 2023-06-09 16:53:23 +02:00
chrchr-github c609ef8814 Add Yield::AT_INDEX 2023-06-09 16:53:23 +02:00
chrchr-github ac87c1174c Revert "Remove redundant functions"
This reverts commit 4f124a57de5c761ac757ebed83d9f047ef4a1328.
2023-06-09 16:53:23 +02:00
chrchr-github 3f0999b015 Remove redundant functions 2023-06-09 16:53:23 +02:00
chrchr-github 605ff520b9 Add Yield::BUFFER 2023-06-09 16:53:23 +02:00
chrchr-github e798e72252 Handle combined action/yield 2023-06-09 16:53:22 +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
Daniel Marjamäki 2beb46194f philosphy.md: Remove section about bughunting it has been moved to Cppcheck Premium 2023-06-09 09:40:58 +02:00
Daniel Marjamäki b086873599
Cppcheck: change severity from information to error for internalError (#5133) 2023-06-08 23:31:36 +02:00
Daniel Marjamäki 3630ba9a3d AUTHORS: add carlatcrown 2023-06-08 20:05:09 +02:00
Carl Morgan 6741f774b1
Support integer Z suffix and user defined literals with _ suffix (#10807, #11438) (#5130)
Co-authored-by: Carl Morgan <no-reply@crown.com>
2023-06-08 20:03:41 +02:00
Daniel Marjamäki d4902109cd
threadsafety.py: cleanup (#5132) 2023-06-08 19:58:11 +02:00
Andrew C Aitchison 0727528876
The threadsafety.py addon now flags MT-Unsafe symbols and functions. (#5086) 2023-06-08 14:46:09 +02:00
Daniel Marjamäki 520a6644a6
y2038.py: some fixes for obsolete code in y2038.py (#5131) 2023-06-08 14:44:05 +02:00
chrchr-github be2824b003
Fix FN deallocuse with array access (#5121)
* Fix FN deallocuse with array access

* Fix another FN

* Undo
2023-06-08 07:55:49 +02:00
chrchr-github 901b775471
Fix scope for function returning rvalue reference, insert std:: in return statement (#5119)
* Fix scope for function returning rvalue reference

* Insert std:: in return statement

* Fix failing test
2023-06-08 07:47:21 +02:00
chrchr-github 4dbbae62a7
Fix #11753 FN: invalidLifetime (#5128)
* Fix #11753 FN: invalidLifetime

* Format

* Format

* Only forward for local variables

* Format

* Format
2023-06-08 07:45:59 +02:00
chrchr-github 3ff8ce316c
Fix AST for parameter pack (#10199, #10492, #11103) (#5125)
* Fix AST for parameter pack (#10199, #10492, #11103)

* Skip ... after )
2023-06-07 20:46:14 +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
chrchr-github 12fe652321
Fix #11063 FP unreadVariable with extra parentheses and scope operator (#5122) 2023-06-07 20:45:27 +02:00
Daniel Marjamäki ae83d53813
GUI: Do not replace relative paths with absolute paths in suppressions. (#5127) 2023-06-07 20:42:18 +02:00
chrchr-github 39f958bcfb
Fix #11596 FP uninitvar with array of function pointers (#5098) 2023-06-07 11:41:22 +02:00
Daniel Marjamäki 30aa0ae880 AUTHORS: Added rwiesenfarth 2023-06-07 11:36:59 +02:00
Rainer Wiesenfarth f4f58bf020
Fix #11081 GUI: Windows release build crashes (#5083)
* Fix #11081 GUI: Windows release build crashes

Use generator expressions rather than if statements when adding compiler
options or definitions.

* Fix #11081 GUI: Windows CMake debug build fails with default options

When DISABLE_CRTDBG_MAP_ALLOC is using the default value (OFF), the
debug build of cppcheck-gui fails, as the "realloc" method names in some
of the Qt headers are replaced by the macro defined by the compiler.
Thus DISABLE_CRTDBG_MAP_ALLOC is explicitely set when compiling
cppcheck-gui in Debug mode using MSVC.
2023-06-07 11:33:55 +02:00
chrchr-github ac86eda6b3
Revert "Revert "Skip forwarding values for unique expressions (#5103)"" (#5124) 2023-06-07 11:11:48 +02:00
Daniel Marjamäki 7d4472616b Revert "Skip forwarding values for unique expressions (#5103)"
This reverts commit 26ed052e8d.
2023-06-06 17:31:24 +02:00
Paul Fultz II 26ed052e8d
Skip forwarding values for unique expressions (#5103) 2023-06-05 20:49:19 +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
Haowei Hsu 34cecf2336
GUI: Update zh_TW translation (#5115) 2023-06-05 20:45:52 +02:00
Daniel Marjamäki 5976faaaf5
Fixed #11745 (Fix AST for 'new type..[..]{..}') (#5118) 2023-06-05 20:43:17 +02:00
Daniel Marjamäki f4cfed674c AUTHORS: Add hwhsu1231 2023-06-04 07:53:17 +02:00
Haowei Hsu bf8b3188a3
GUI: Add zh_TW translation (#5108) 2023-06-04 07:51:48 +02:00
chrchr-github 18b60d2f2b
Fix #11670 FP constStatement (inconclusive) triggered by namespace (#5114) 2023-06-03 15:13:15 +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 1b98be458d
Fix #11739 Assert failure in valueflow.cpp / setSymbolic() (#5104) 2023-06-03 11:08:06 +02:00
chrchr-github 82e9c076da
Fix #11744 FN functionConst/functionStatic with recursion (#5105)
* Fix FN functionStatic

* Fix FN functionConst, add test

* Fix build
2023-06-02 23:33:42 +02:00
chrchr-github 055489df5a
Fix #11742 Can't reduce scope as variable references itself (#5112) 2023-06-02 23:33:17 +02:00