Bug 362587 - Don't warn for detach on QSequentialIterable and QAssociativeIterable
Summary: Don't warn for detach on QSequentialIterable and QAssociativeIterable
Status: RESOLVED FIXED
Alias: None
Product: clazy
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: Sergio Martins
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-02 14:21 UTC by eric.lemanissier
Modified: 2016-05-02 19:51 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description eric.lemanissier 2016-05-02 14:21:24 UTC
QSequentialIterable and QAssociativeIterable  have only const members, so there is no way they could be detached. Currently, clazy-range-loop warns "c++11 range-loop might detach Qt container (QSequentialIterable)" if the QSequentialIterable object is not const. I did not check QAssociativeIterable.


Reproducible: Always
Comment 1 Sergio Martins 2016-05-02 19:51:28 UTC
Git commit 8384d74e37e1dcea80a2c9cf524b9c0ef3be34d3 by Sergio Martins.
Committed on 02/05/2016 at 19:50.
Pushed by smartins into branch 'master'.

range-loop: Don't warn for non implicitly shared classes

M  +1    -1    checks/range-loop.cpp
M  +5    -1    tests/range-loop/main.cpp

http://commits.kde.org/clazy/8384d74e37e1dcea80a2c9cf524b9c0ef3be34d3