Fixed false positive in stlBoundries check (#3740)
This commit is contained in:
parent
c6f6194008
commit
1793bf8928
|
@ -695,7 +695,7 @@ void CheckStl::stlBoundries()
|
|||
--indentlevel;
|
||||
} else if (Token::Match(tok2, "!!* %varid% <", iteratorid)) {
|
||||
stlBoundriesError(tok2, container_name);
|
||||
} else if (Token::Match(tok2, "> %varid%", iteratorid)) {
|
||||
} else if (Token::Match(tok2, "> %varid% !!.", iteratorid)) {
|
||||
stlBoundriesError(tok2, container_name);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1137,6 +1137,12 @@ private:
|
|||
"}\n");
|
||||
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
|
||||
check("bool f() {\n"
|
||||
" static set<Foo>::const_iterator current;\n"
|
||||
" return 25 > current->bar;\n"
|
||||
"}");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue