mirror of
https://github.com/github/codeql.git
synced 2026-04-24 08:15:14 +02:00
C++: Accept query test changes.
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
| test.cpp:680:30:680:30 | call to operator[] | This object is destroyed before $@ is called. | test.cpp:680:17:680:17 | call to begin | call to begin |
|
||||
| test.cpp:680:30:680:30 | call to operator[] | This object is destroyed before $@ is called. | test.cpp:680:17:680:17 | call to end | call to end |
|
||||
| test.cpp:683:31:683:32 | call to at | This object is destroyed before $@ is called. | test.cpp:683:17:683:17 | call to begin | call to begin |
|
||||
| test.cpp:683:31:683:32 | call to at | This object is destroyed before $@ is called. | test.cpp:683:17:683:17 | call to end | call to end |
|
||||
| test.cpp:689:17:689:29 | temporary object | This object is destroyed before $@ is called. | test.cpp:689:31:689:35 | call to begin | call to begin |
|
||||
| test.cpp:689:46:689:58 | temporary object | This object is destroyed before $@ is called. | test.cpp:689:60:689:62 | call to end | call to end |
|
||||
| test.cpp:702:27:702:27 | call to operator[] | This object is destroyed before $@ is called. | test.cpp:703:19:703:23 | call to begin | call to begin |
|
||||
| test.cpp:702:27:702:27 | call to operator[] | This object is destroyed before $@ is called. | test.cpp:703:36:703:38 | call to end | call to end |
|
||||
| test.cpp:716:36:716:48 | temporary object | This object is destroyed before $@ is called. | test.cpp:716:17:716:17 | call to begin | call to begin |
|
||||
| test.cpp:716:36:716:48 | temporary object | This object is destroyed before $@ is called. | test.cpp:716:17:716:17 | call to end | call to end |
|
||||
| test.cpp:727:23:727:23 | call to operator[] | This object is destroyed before $@ is called. | test.cpp:750:17:750:17 | call to begin | call to begin |
|
||||
| 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 |
|
||||
|
||||
@@ -677,10 +677,10 @@ std::vector<std::vector<int>> return_self_by_value(const std::vector<std::vector
|
||||
|
||||
void test() {
|
||||
for (auto x : returnValue()) {} // GOOD
|
||||
for (auto x : returnValue()[0]) {} // BAD [NOT DETECTED] (see *)
|
||||
for (auto x : returnValue()[0]) {} // BAD
|
||||
for (auto x : external_by_value(returnValue())) {} // GOOD
|
||||
for (auto x : external_by_const_ref(returnValue())) {} // GOOD
|
||||
for (auto x : returnValue().at(0)) {} // BAD [NOT DETECTED] (see *)
|
||||
for (auto x : returnValue().at(0)) {} // BAD
|
||||
|
||||
for (auto x : returnRef()) {} // GOOD
|
||||
for (auto x : returnRef()[0]) {} // GOOD
|
||||
@@ -700,7 +700,7 @@ void test() {
|
||||
|
||||
{
|
||||
auto&& v = returnValue()[0];
|
||||
for(auto it = v.begin(); it != v.end(); ++it) {} // BAD [NOT DETECTED] (see *)
|
||||
for(auto it = v.begin(); it != v.end(); ++it) {} // BAD
|
||||
}
|
||||
|
||||
{
|
||||
@@ -713,7 +713,7 @@ void test() {
|
||||
for(auto it = v.begin(); it != v.end(); ++it) {} // GOOD
|
||||
}
|
||||
|
||||
for (auto x : return_self_by_ref(returnValue())) {} // BAD [NOT DETECTED] (see *)
|
||||
for (auto x : return_self_by_ref(returnValue())) {} // BAD
|
||||
|
||||
for (auto x : return_self_by_value(returnValue())) {} // GOOD
|
||||
}
|
||||
@@ -724,7 +724,7 @@ void iterate(const std::vector<T>& v) {
|
||||
}
|
||||
|
||||
std::vector<int>& ref_to_first_in_returnValue_1() {
|
||||
return returnValue()[0]; // BAD [NOT DETECTED] (see *)
|
||||
return returnValue()[0]; // BAD
|
||||
}
|
||||
|
||||
std::vector<int>& ref_to_first_in_returnValue_2() {
|
||||
@@ -732,7 +732,7 @@ std::vector<int>& ref_to_first_in_returnValue_2() {
|
||||
}
|
||||
|
||||
std::vector<int>& ref_to_first_in_returnValue_3() {
|
||||
return returnValue()[0]; // BAD [NOT DETECTED] (see *)
|
||||
return returnValue()[0]; // BAD
|
||||
}
|
||||
|
||||
std::vector<int> first_in_returnValue_1() {
|
||||
|
||||
Reference in New Issue
Block a user