| Summary: | Wrong warning about using stl container | ||
|---|---|---|---|
| Product: | [Developer tools] clazy | Reporter: | Albert Astals Cid <aacid> |
| Component: | general | Assignee: | 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: | http://commits.kde.org/clazy/72ae7ae09dfb1ce8108556b9bf410d286a12311a | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
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 |
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