Bug 354404

Summary: Wrong warning about using stl container
Product: [Developer tools] clazy Reporter: Albert Astals Cid <aacid>
Component: generalAssignee: Sergio Martins <smartins>
Status: RESOLVED FIXED    
Severity: normal CC: smartins
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

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