[clazy] [Bug 398633] Feature request add tests for qt containers and qobjects

2018-09-15 Thread Mike Harris
https://bugs.kde.org/show_bug.cgi?id=398633

--- Comment #2 from Mike Harris  ---
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?

-- 
You are receiving this mail because:
You are watching all bug changes.

[clazy] [Bug 398633] Feature request add tests for qt containers and qobjects

2018-09-15 Thread Sergio Martins
https://bugs.kde.org/show_bug.cgi?id=398633

Sergio Martins  changed:

   What|Removed |Added

 Ever confirmed|0   |1
   Severity|normal  |wishlist
 Status|UNCONFIRMED |CONFIRMED

--- Comment #1 from Sergio Martins  ---
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"

-- 
You are receiving this mail because:
You are watching all bug changes.