mirror of
https://github.com/github/codeql.git
synced 2026-04-24 16:25:15 +02:00
Merge pull request #16416 from MathiasVP/add-iterator-to-expired-container-fp-2
C++: Add `cpp/iterator-to-expired-container` FP
This commit is contained in:
@@ -4,3 +4,4 @@
|
||||
| test.cpp:702:27:702:27 | call to operator[] | This object is destroyed at the end of the full-expression. |
|
||||
| test.cpp:727:23:727:23 | call to operator[] | This object is destroyed at the end of the full-expression. |
|
||||
| test.cpp:735:23:735:23 | call to operator[] | This object is destroyed at the end of the full-expression. |
|
||||
| test.cpp:803:3:803:3 | pointer to ~vector output argument | This object is destroyed at the end of the full-expression. |
|
||||
|
||||
@@ -792,4 +792,13 @@ void test4() {
|
||||
// function we may end up in the destructor call `chunk.~A()`in `A.foo`. This destructor
|
||||
// call can flow to `begin` through the back-edge and cause a strange FP.
|
||||
auto zero = A().size();
|
||||
}
|
||||
|
||||
void test5(int i)
|
||||
{
|
||||
while(i < 10) {
|
||||
const auto& vvs = returnValue();
|
||||
for(const auto& vs : vvs) { }
|
||||
++i;
|
||||
} // GOOD [FALSE POSITIVE]
|
||||
}
|
||||
Reference in New Issue
Block a user