Commit Graph

901 Commits

Author SHA1 Message Date
Oliver Stöneberg 61bbcbeeee
fixed #12108 - Crash in `CTU::FileInfo::getErrorPath()` with Clang-built binary (#5746)
This is actually just a workaround as it seems the issue is an upstream
Clang one.
2023-12-14 17:44:09 +01:00
Oliver Stöneberg 4182f943aa
use more granular suppressions in selfcheck and prefer inline suppressions (#5703) 2023-12-01 15:59:01 +01:00
Oliver Stöneberg f2461781fd
added `xml.h` wrapper for TinyXML2 / cleaned up suppressions of Clang compiler warnings (#5700) 2023-11-26 14:04:35 +01:00
chrchr-github 30bf5cac0a
Partial fix for #12162 false negative: functionConst (#5639) 2023-11-08 22:37:45 +01:00
chrchr-github cf64ccea22
Fix #12147 false negative: passedByValue (#5626) 2023-11-07 22:50:31 +01:00
chrchr-github de2cfb05b0
Fix #12150 FP uninitialized member array, initialized in range for loop (#5627) 2023-11-06 16:15:47 +01:00
Oliver Stöneberg 63e00ea918
fixed some "Variable can be made constexpr" Rider warnings (#5615) 2023-11-03 09:55:44 +01:00
Oliver Stöneberg e6d15b17ff
extracted `FileSettings` from `ImportProject` to `filesettings.h` (#5604) 2023-11-02 17:42:41 +01:00
chrchr-github 10654386db
Fix #12128 FP uninitDerivedMemberVar with brace init (#5606) 2023-11-01 09:49:32 +01:00
Oliver Stöneberg 09785a4eb8
moved `MyFileInfo` definitions into source files (#4697) 2023-10-21 16:58:29 +02:00
Oliver Stöneberg 3811d01498
fixed "Redundant dereferencing and tasking address expression" Rider warnings (#5563) 2023-10-16 14:09:03 +02:00
chrchr-github f13134a6a4
Refactoring: use init list, redundant init (#5552) 2023-10-15 14:51:12 +02:00
Oliver Stöneberg 06b5ef1e4d
cleaned up includes based on include-what-you-use (#5532) 2023-10-09 10:07:20 +02:00
Oliver Stöneberg a22c181553
fixed "Redundant elaborated type specifier" Rider warnings (#5517) 2023-10-08 09:10:17 +02:00
Daniel Marjamäki 88a9119f88
Fixed #11907 (False positive: uninitialized member (mutable member, const method call)) (#5384) 2023-09-01 18:10:21 +02:00
Daniel Marjamäki 276f017fbe
Partial fix for #11897 (Safety: show what checks are enabled/disabled) (#5372)
Example output on stdout:
```
$ ./cppcheck m1.cpp 
Checking m1.cpp ...
Active checkers: 59/177
```
2023-08-29 12:00:52 +02:00
Oliver Stöneberg a92b10ca3b
fixes #11104 (avoid C++-only parsing when processing C code in parsedecl()) / also avoid remaining `Library::detect*()` calls (#5346) 2023-08-18 22:48:24 +02:00
Oliver Stöneberg 3cf9100198
fixed #6316 (Use std::to_string() in place of MathLib::toString() ...) - deleted default implementation of `Mathlib::toString()` (#5341)
It was also used inconsistently and seemed to imply there is some
special handling which wasn't the case. It was just an alias for
`std::to_string()` for non-`double` types. So there was no need for it.

---------

Co-authored-by: Robert Reif <reif@earthlink.net>
2023-08-17 16:46:32 +02:00
Samuel Poláček 09962a6bcf
Edit verbose warning message for uninitVarError (#5301)
I think that context needs to be provided as to why it is an issue that
a variable is not initialized.
2023-08-08 15:11:39 +02:00
Oliver Stöneberg 45de338f1b
cleaned up includes based on include-what-you-use / iwyu.yml: updated to yet another distro to get the latest version and updated the Chaotic-AUR key (#5267)
This is a mess. The version is AUR is still outdated and also doesn't
install anymore. Fedora 38 carries the latest version of it so use that
now. Keep the old steps in case we need to switch again in the future.
2023-08-02 10:36:17 +02:00
Samuel Poláček e7a2585e0a
noExplicitConstructor - Verbose error message edit (#5260)
The goal is to use keywords like "converting constructor" and "implicit
conversion" that will help users further study what this warning is
about. I think that the old message provided no context to the
uninitiated.
2023-08-01 11:21:23 +02:00
Samuel Poláček c5deb0a631
Fix a typo in error message (#5264) 2023-07-26 07:54:59 +02:00
chrchr-github 258581ce2e
Fix FP uselessOverride with macro (#5238) 2023-07-13 12:18:29 +02:00
chrchr-github c0bd9f8bbd
Fix #11827 FP duplInheritedMember - different return type (#5231) 2023-07-12 15:56:07 +02:00
chrchr-github 49b79b7674
Extend duplInheritedMember check to functions (#5226) 2023-07-08 12:05:19 +02:00
chrchr-github e73183a182
Fix FP uselessOverride with shadowed member functions (#5225)
We should probably use `getDuplInheritedMemberFunctionsRecursive()` as
part of the `duplInheritedMember` check.
2023-07-07 20:17:58 +02:00
chrchr-github c738627d15
Fix uselessOverride FPs (#5223) 2023-07-07 13:18:00 +02:00
chrchr-github dde45455bf
uselessOverride: Detect code duplication in overriding function (#5219) 2023-07-05 22:58:01 +02:00
chrchr-github 6d9fa6f10a
Fix #11803 FP uselessOverride - overloaded virtual member function (#5211) 2023-06-30 15:21:08 +02:00
chrchr-github e9feeef81d
Fix FPs: uselessOverride (#5208) 2023-06-29 20:46:12 +02:00
chrchr-github a40e5817bf
Fix #11757 Detect useless overriding functions (#5155) 2023-06-29 07:43:35 +02:00
chrchr-github 9dc38f80c0
Fix #11790 FP functionConst with template function (#5187) 2023-06-25 20:38:54 +02:00
chrchr-github b26bfc9b4f
Use getAllocFuncInfo() (#5176) 2023-06-21 17:35:15 +02:00
chrchr-github bb962e2bc3
Enable and mitigate readability-else-after-return (#5175) 2023-06-20 18:43:21 +02:00
Daniel Marjamäki d75331d00d
Fix #11435 (FP ctuOneDefinitionRuleViolation for template specialization) (#5156) 2023-06-15 11:43:07 +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 a91222fad8
Partial fix for #11637 FN functionConst (#5102)
* Partial fix for #11637 FN functionConst

* Redundant check
2023-05-31 20:55:12 +02:00
chrchr-github 7696bd1357
Fix #11225 FN constParameter with cast (#5100)
* Fix #11225 FN constParameter with cast

* Add const
2023-05-31 16:51:03 +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 647432580f
Fix #11720 FN functionConst when using base class members (#5068)
* Fix #11720 FN functionConst when using base class members

* Format

* Add const

* Add const

* Improve const check for arguments, comments, tests

* Add test for #11573

* Add test for #11501

* Fix merge

* Add tests

* Use ASSERT_EQUALS

* Redundant check
2023-05-28 01:11:59 +02:00
chrchr-github 10b55cc0cf
Fix #11654 FN functionConst if only non-const member usage is call to itself (#5092)
* Fix #11654 FN functionConst if only non-const member usage is call to itself

* Format

* Add const
2023-05-26 17:24:13 +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
chrchr-github d30f8e18f7
Partial fix for #11626 FN functionConst with non-dereferenceable pointer access (#5070) 2023-05-21 14:00:24 +02:00
Daniel Marjamäki f72db74817
Fixed #11013 (FP overlappingWriteUnion with anonymous struct in union) (#5067) 2023-05-20 10:34:42 +02:00
Oliver Stöneberg 0924e6616e
made some member functions static (#4966) 2023-04-28 12:29:40 +02:00
Oliver Stöneberg f5e51eace7
do not use string-to-integer conversions without error handling (#4906) 2023-04-08 22:29:09 +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
chrchr-github 8043930a0f
Fix FN uninitMemberVar with std::array (#4935) 2023-04-06 18:45:12 +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 7bf6b359b1
Fix #11616 false negative: functionConst (#4887) 2023-03-27 17:54:19 +02:00