File tree Expand file tree Collapse file tree
common/test/rules/nullptrnottheonlyformofthenullpointerconstant
misra/test/rules/RULE-7-0-6 Expand file tree Collapse file tree Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff line change @@ -368,11 +368,12 @@ void test_template_functions() {
368368
369369// Test initialization forms
370370std::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
378379std::int32_t test_return () {
You can’t perform that action at this time.
0 commit comments