Bug 354404 - Wrong warning about using stl container
Summary: Wrong warning about using stl container
Status: RESOLVED FIXED
Alias: None
Product: clazy
Classification: Developer tools
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Sergio Martins
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-26 14:29 UTC by Albert Astals Cid
Modified: 2015-10-26 22:48 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 Albert Astals Cid 2015-10-26 14:29:54 UTC
Code like

void testQRegionRects()
{
    QRegion r;
    foreach (const QRect &rect, r.rects()) { // no warning
    }
}


triggers a warning saying that an stl container has been used, i did a quick debugging and the code thinks the container here is QRegion instead of QVector and since it's not one of the "blessed" containers, complains about it
Comment 1 Sergio Martins 2015-10-26 22:48:42 UTC
Git commit 72ae7ae09dfb1ce8108556b9bf410d286a12311a by Sergio Martins.
Committed on 26/10/2015 at 22:36.
Pushed by smartins into branch 'master'.

foreach: Fix detection of container type

M  +19   -6    checks/foreach.cpp
M  +8    -2    tests/foreach/main.cpp

http://commits.kde.org/clazy/72ae7ae09dfb1ce8108556b9bf410d286a12311a