Fixed #8723: False negative: Same expression with methods

This commit is contained in:
orbitcowboy 2021-09-17 19:46:46 +02:00
parent a6c98e9e60
commit 578d3c3a93
2 changed files with 8 additions and 0 deletions

View File

@ -945,6 +945,7 @@
<function name="QString::compare">
<noreturn>false</noreturn>
<returnValue type="int"/>
<const/>
<use-retval/>
<leak-ignore/>
<arg nr="1" direction="in">

View File

@ -279,6 +279,13 @@ QVector<int>::iterator QVector2()
return it;
}
void duplicateExpression_QString_Compare(QString style) //#8723
{
// cppcheck-suppress duplicateExpression
if (style.compare( "x", Qt::CaseInsensitive ) == 0 || style.compare( "x", Qt::CaseInsensitive ) == 0)
{}
}
void QStack1(QStack<int> intStackArg)
{
for (int i = 0; i <= intStackArg.size(); ++i) {