[clazy] [Bug 404328] New: don't warn about strict iterator mismatch in const function
Milian Wolff
bugzilla_noreply at kde.org
Thu Feb 14 09:00:07 GMT 2019
https://bugs.kde.org/show_bug.cgi?id=404328
Bug ID: 404328
Summary: don't warn about strict iterator mismatch in const
function
Product: clazy
Version: unspecified
Platform: Other
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: general
Assignee: unassigned-bugs at kde.org
Reporter: mail at milianw.de
CC: smartins at kde.org
Target Milestone: ---
struct Bar {
bool foo() const
{
return mFooIt != mFoo();
}
QVector<int> mFoo;
QVector<int>::iterator mFooIt;
};
clazy reports:
=> Mixing iterators with const_iterators
while technically correct, it's quite useless I think. This code works fine and
is safe - maybe the comparison should check whether `const Foo::iterator` and
`Foo::const_iterator` are compared, and if so don't emit the warning?
clazy version: 1.5
clang version: 7.0.1
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Unassigned-bugs
mailing list