Skip to content

Commit b30dcba

Browse files
authored
Merge pull request #1192 from jketema/jketema/frontend-upgrade
Update test after frontend upgrade
2 parents 49c05e3 + fb4a2ec commit b30dcba

4 files changed

Lines changed: 10 additions & 9 deletions

File tree

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ 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 - Not accepted by clang or by CodeQL when mimicking clang
19-
f3("0"); // COMPLIANT - "0" is not a literal zero
18+
// f1('\0'); // NON_COMPLIANT - use of octal escape 0 - Not accepted by
19+
// clang or by CodeQL when mimicking clang
20+
f3("0"); // COMPLIANT - "0" is not a literal zero
2021
}

‎cpp/misra/test/rules/RULE-0-2-3/UnusedTypeWithLimitedVisibility.expected‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
| templates.cpp:42:12:42:13 | A1 | Type 'A1' with limited visibility is not used. |
2-
| templates.cpp:93:11:93:12 | A1 | Type 'A1' with limited visibility is not used. |
32
| test.cpp:5:9:5:10 | T1 | Type 'T1' with limited visibility is not used. |
43
| test.cpp:31:8:31:9 | A2 | Type 'A2' with limited visibility is not used. |
54
| test.cpp:61:28:61:29 | C1<<unnamed>> | Type 'C1<<unnamed>>' with limited visibility is not used. |

‎cpp/misra/test/rules/RULE-0-2-3/templates.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ namespace use_as_template_parameter_type {
9090
* parameter
9191
*/
9292
namespace use_as_template_parameter_default_value {
93-
class A1 { // COMPLIANT[False positive]
93+
class A1 { // COMPLIANT
9494
static const int a = 42;
9595
};
9696

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -368,11 +368,12 @@ void test_template_functions() {
368368

369369
// Test initialization forms
370370
std::int32_t f12(std::int8_t l1) {
371-
std::int16_t l2 = l1; // COMPLIANT
372-
std::int16_t l3{l1}; // COMPLIANT
373-
std::int16_t l4(l1); // COMPLIANT
374-
// std::int16_t l5{l1 + l1}; // NON_COMPLIANT - Not accepted by clang or by CodeQL when mimicking clang
375-
return l1; // COMPLIANT
371+
std::int16_t l2 = l1; // COMPLIANT
372+
std::int16_t l3{l1}; // COMPLIANT
373+
std::int16_t l4(l1); // COMPLIANT
374+
// std::int16_t l5{l1 + l1}; // NON_COMPLIANT - Not accepted by clang or by
375+
// CodeQL when mimicking clang
376+
return l1; // COMPLIANT
376377
}
377378

378379
std::int32_t test_return() {

0 commit comments

Comments
 (0)