Skip to content

Commit 803dbeb

Browse files
committed
Disable tests that no longer work with the extractor
1 parent 6a381b9 commit 803dbeb

4 files changed

Lines changed: 4 additions & 6 deletions

File tree

Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
| test.cpp:10:13:10:13 | 0 | 0 is used as the null-pointer-constant but is not nullptr. |
22
| test.cpp:11:6:11:6 | 0 | 0 is used as the null-pointer-constant but is not nullptr. |
33
| test.cpp:17:6:17:9 | 0 | NULL is used as the null-pointer-constant but is not nullptr. |
4-
| test.cpp:18:6:18:9 | 0 | '\\0' is used as the null-pointer-constant but is not nullptr. |

cpp/common/test/rules/nullptrnottheonlyformofthenullpointerconstant/test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ void test_nullptr() {
1515
int l3 = 0; // COMPLIANT - use of 0 literal with no conversion to pointer
1616
f3(f1, nullptr); // COMPLIANT - use of nullptr
1717
f1(NULL); // NON_COMPLIANT - use of NULL macro
18-
f1('\0'); // NON_COMPLIANT - use of octal escape 0
18+
// f1('\0'); // NON_COMPLIANT - use of octal escape 0 - Not accepted by clang or by CodeQL when mimicking clang
1919
f3("0"); // COMPLIANT - "0" is not a literal zero
20-
}
20+
}

cpp/misra/test/rules/RULE-7-0-6/NumericAssignmentTypeMismatch.expected

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
| test.cpp:340:12:340:13 | s8 | Assignment between incompatible numeric types from 'int8_t' to 'int32_t'. |
5454
| test.cpp:342:32:342:33 | s8 | Assignment between incompatible numeric types from 'int8_t' to 'int32_t'. |
5555
| test.cpp:362:25:362:27 | u32 | Assignment between incompatible numeric types from 'uint32_t' to 'unsigned long'. |
56-
| test.cpp:374:19:374:25 | ... + ... | Assignment between incompatible numeric types from 'int' to 'int16_t'. |
5756
| test.cpp:379:10:379:12 | u32 | Assignment between incompatible numeric types from 'uint32_t' to 'int32_t'. |
5857
| test.cpp:412:8:412:9 | l6 | Assignment between incompatible numeric types from 'uint32_t &' to 'uint8_t'. |
5958
| test.cpp:413:8:413:9 | l7 | Assignment between incompatible numeric types from 'int8_t &' to 'uint8_t'. |

cpp/misra/test/rules/RULE-7-0-6/test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ std::int32_t f12(std::int8_t l1) {
371371
std::int16_t l2 = l1; // COMPLIANT
372372
std::int16_t l3{l1}; // COMPLIANT
373373
std::int16_t l4(l1); // COMPLIANT
374-
std::int16_t l5{l1 + l1}; // NON_COMPLIANT
374+
// std::int16_t l5{l1 + l1}; // NON_COMPLIANT - Not accepted by clang or by CodeQL when mimicking clang
375375
return l1; // COMPLIANT
376376
}
377377

@@ -640,4 +640,4 @@ void test_explicit_casts() {
640640
// Function calls with explicit casts
641641
f1(static_cast<std::int64_t>(l4)); // COMPLIANT
642642
f2(static_cast<std::int32_t>(l4)); // COMPLIANT
643-
}
643+
}

0 commit comments

Comments
 (0)