Skip to content

Commit 53c2d2f

Browse files
committed
C++: Accept test changes.
1 parent 07d51a5 commit 53c2d2f

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
| test.cpp:680:30:680:30 | call to operator[] | This object is destroyed at the end of the full-expression. |
22
| test.cpp:683:31:683:32 | call to at | This object is destroyed at the end of the full-expression. |
3-
| test.cpp:689:46:689:58 | pointer to ~vector output argument | This object is destroyed at the end of the full-expression. |
43
| test.cpp:702:27:702:27 | call to operator[] | This object is destroyed at the end of the full-expression. |
54
| test.cpp:727:23:727:23 | call to operator[] | This object is destroyed at the end of the full-expression. |
65
| test.cpp:735:23:735:23 | call to operator[] | This object is destroyed at the end of the full-expression. |
7-
| test.cpp:803:3:803:3 | pointer to ~vector output argument | This object is destroyed at the end of the full-expression. |

cpp/ql/test/query-tests/Security/CWE/CWE-416/semmle/tests/IteratorToExpiredContainer/test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ void test() {
686686
for (auto x : returnRef()[0]) {} // GOOD
687687
for (auto x : returnRef().at(0)) {} // GOOD
688688

689-
for(auto it = returnValue().begin(); it != returnValue().end(); ++it) {} // BAD
689+
for(auto it = returnValue().begin(); it != returnValue().end(); ++it) {} // BAD [NOT DETECTED]
690690

691691
{
692692
auto v = returnValue();
@@ -800,5 +800,5 @@ void test5(int i)
800800
const auto& vvs = returnValue();
801801
for(const auto& vs : vvs) { }
802802
++i;
803-
} // GOOD [FALSE POSITIVE]
803+
} // GOOD
804804
}

0 commit comments

Comments
 (0)