Skip to content

Commit 7fb2329

Browse files
committed
C++: Accept test changes after github/codeql/pull/14637.
1 parent 25cc757 commit 7fb2329

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

cpp/cert/test/rules/MEM53-CPP/MissingConstructorCallForManuallyManagedObject.expected

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ WARNING: Module DataFlow has been deprecated and may be removed in future (/home
22
WARNING: Module DataFlow has been deprecated and may be removed in future (/home/runner/work/semmle-code/semmle-code/codeql-coding-standards/cpp/cert/src/rules/MEM53-CPP/MissingConstructorCallForManuallyManagedObject.ql:25,38-46)
33
WARNING: Module DataFlow has been deprecated and may be removed in future (/home/runner/work/semmle-code/semmle-code/codeql-coding-standards/cpp/cert/src/rules/MEM53-CPP/MissingConstructorCallForManuallyManagedObject.ql:25,65-73)
44
edges
5+
| test.cpp:65:21:65:34 | call to operator new | test.cpp:67:26:67:32 | call to realloc |
56
nodes
67
| test.cpp:16:26:16:31 | call to malloc | semmle.label | call to malloc |
78
| test.cpp:17:38:17:43 | call to malloc | semmle.label | call to malloc |
@@ -12,6 +13,8 @@ nodes
1213
| test.cpp:47:26:47:39 | call to operator new | semmle.label | call to operator new |
1314
| test.cpp:49:29:49:42 | call to operator new | semmle.label | call to operator new |
1415
| test.cpp:51:29:51:42 | call to operator new | semmle.label | call to operator new |
16+
| test.cpp:65:21:65:34 | call to operator new | semmle.label | call to operator new |
17+
| test.cpp:67:26:67:32 | call to realloc | semmle.label | call to realloc |
1518
subpaths
1619
#select
1720
| test.cpp:16:26:16:31 | call to malloc | test.cpp:16:26:16:31 | call to malloc | test.cpp:16:26:16:31 | call to malloc | Allocation to cast without constructor call |
@@ -23,3 +26,4 @@ subpaths
2326
| test.cpp:47:26:47:39 | call to operator new | test.cpp:47:26:47:39 | call to operator new | test.cpp:47:26:47:39 | call to operator new | Allocation to cast without constructor call |
2427
| test.cpp:49:29:49:42 | call to operator new | test.cpp:49:29:49:42 | call to operator new | test.cpp:49:29:49:42 | call to operator new | Allocation to cast without constructor call |
2528
| test.cpp:51:29:51:42 | call to operator new | test.cpp:51:29:51:42 | call to operator new | test.cpp:51:29:51:42 | call to operator new | Allocation to cast without constructor call |
29+
| test.cpp:67:26:67:32 | call to realloc | test.cpp:65:21:65:34 | call to operator new | test.cpp:67:26:67:32 | call to realloc | Allocation to cast without constructor call |

cpp/cert/test/rules/MEM53-CPP/test.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,5 +64,5 @@ void test_no_constructor_but_has_destructor() {
6464
void test_realloc() {
6565
void *goodAlloc = ::operator new(sizeof(ClassA));
6666
ClassA *a1 = new (goodAlloc) ClassA{1}; // COMPLIANT
67-
ClassA *a2 = (ClassA *)realloc(goodAlloc, sizeof(ClassA) * 2); // COMPLIANT
67+
ClassA *a2 = (ClassA *)realloc(goodAlloc, sizeof(ClassA) * 2); // COMPLIANT [FALSE_POSITIVE]
6868
}

0 commit comments

Comments
 (0)