mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Merge pull request #16232 from MathiasVP/add-iterator-to-expired-container-fp
C++: Add `cpp/iterator-to-expired-container` FP test
This commit is contained in:
@@ -12,3 +12,5 @@
|
||||
| test.cpp:727:23:727:23 | call to operator[] | This object is destroyed before $@ is called. | test.cpp:750:17:750:17 | call to end | call to end |
|
||||
| test.cpp:735:23:735:23 | call to operator[] | This object is destroyed before $@ is called. | test.cpp:759:17:759:17 | call to begin | call to begin |
|
||||
| test.cpp:735:23:735:23 | call to operator[] | This object is destroyed before $@ is called. | test.cpp:759:17:759:17 | call to end | call to end |
|
||||
| test.cpp:771:44:771:56 | temporary object | This object is destroyed before $@ is called. | test.cpp:772:35:772:35 | call to begin | call to begin |
|
||||
| test.cpp:771:44:771:56 | temporary object | This object is destroyed before $@ is called. | test.cpp:772:35:772:35 | call to end | call to end |
|
||||
|
||||
@@ -766,3 +766,8 @@ void test2() {
|
||||
for (auto x : value) {}
|
||||
}
|
||||
}
|
||||
|
||||
void test3() {
|
||||
const std::vector<std::vector<int>>& v = returnValue(); // GOOD [FALSE POSITIVE]
|
||||
for(const std::vector<int>& x : v) {}
|
||||
}
|
||||
Reference in New Issue
Block a user