Summary: | Feature request add tests for qt containers and qobjects | ||
---|---|---|---|
Product: | [Developer tools] clazy | Reporter: | Mike Harris <mike.a.harris> |
Component: | general | Assignee: | Unassigned bugs mailing-list <unassigned-bugs> |
Status: | CONFIRMED --- | ||
Severity: | wishlist | CC: | smartins |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Mike Harris
2018-09-14 18:32:43 UTC
Your 1st case is difficult to make a generic check for, as there's hundreds of little variations. Your 2nd case could be done, and we could make the following guideline: "If you use qobject_cast you should verify the pointer isn't null before dereferencing i. And if you're sure it's not null then you should have used static_cast in the first place" Can there at least be some form of bounds checking? I'm not sure what other common standard library like container issues are common but maybe some of the most generic common? |