diff --git a/cpp/common/test/rules/nullptrnottheonlyformofthenullpointerconstant/test.cpp b/cpp/common/test/rules/nullptrnottheonlyformofthenullpointerconstant/test.cpp index 5eb25c54bb..1e9b1b50a7 100644 --- a/cpp/common/test/rules/nullptrnottheonlyformofthenullpointerconstant/test.cpp +++ b/cpp/common/test/rules/nullptrnottheonlyformofthenullpointerconstant/test.cpp @@ -15,6 +15,7 @@ void test_nullptr() { int l3 = 0; // COMPLIANT - use of 0 literal with no conversion to pointer f3(f1, nullptr); // COMPLIANT - use of nullptr f1(NULL); // NON_COMPLIANT - use of NULL macro - // f1('\0'); // NON_COMPLIANT - use of octal escape 0 - Not accepted by clang or by CodeQL when mimicking clang - f3("0"); // COMPLIANT - "0" is not a literal zero + // f1('\0'); // NON_COMPLIANT - use of octal escape 0 - Not accepted by + // clang or by CodeQL when mimicking clang + f3("0"); // COMPLIANT - "0" is not a literal zero } diff --git a/cpp/misra/test/rules/RULE-0-2-3/UnusedTypeWithLimitedVisibility.expected b/cpp/misra/test/rules/RULE-0-2-3/UnusedTypeWithLimitedVisibility.expected index 94b7534ec0..d37b5c3263 100644 --- a/cpp/misra/test/rules/RULE-0-2-3/UnusedTypeWithLimitedVisibility.expected +++ b/cpp/misra/test/rules/RULE-0-2-3/UnusedTypeWithLimitedVisibility.expected @@ -1,5 +1,4 @@ | templates.cpp:42:12:42:13 | A1 | Type 'A1' with limited visibility is not used. | -| templates.cpp:93:11:93:12 | A1 | Type 'A1' with limited visibility is not used. | | test.cpp:5:9:5:10 | T1 | Type 'T1' with limited visibility is not used. | | test.cpp:31:8:31:9 | A2 | Type 'A2' with limited visibility is not used. | | test.cpp:61:28:61:29 | C1<> | Type 'C1<>' with limited visibility is not used. | diff --git a/cpp/misra/test/rules/RULE-0-2-3/templates.cpp b/cpp/misra/test/rules/RULE-0-2-3/templates.cpp index ebfd09299f..17c802489c 100644 --- a/cpp/misra/test/rules/RULE-0-2-3/templates.cpp +++ b/cpp/misra/test/rules/RULE-0-2-3/templates.cpp @@ -90,7 +90,7 @@ namespace use_as_template_parameter_type { * parameter */ namespace use_as_template_parameter_default_value { - class A1 { // COMPLIANT[False positive] + class A1 { // COMPLIANT static const int a = 42; }; diff --git a/cpp/misra/test/rules/RULE-7-0-6/test.cpp b/cpp/misra/test/rules/RULE-7-0-6/test.cpp index a52fae52e3..f076d18ede 100644 --- a/cpp/misra/test/rules/RULE-7-0-6/test.cpp +++ b/cpp/misra/test/rules/RULE-7-0-6/test.cpp @@ -368,11 +368,12 @@ void test_template_functions() { // Test initialization forms std::int32_t f12(std::int8_t l1) { - std::int16_t l2 = l1; // COMPLIANT - std::int16_t l3{l1}; // COMPLIANT - std::int16_t l4(l1); // COMPLIANT - // std::int16_t l5{l1 + l1}; // NON_COMPLIANT - Not accepted by clang or by CodeQL when mimicking clang - return l1; // COMPLIANT + std::int16_t l2 = l1; // COMPLIANT + std::int16_t l3{l1}; // COMPLIANT + std::int16_t l4(l1); // COMPLIANT + // std::int16_t l5{l1 + l1}; // NON_COMPLIANT - Not accepted by clang or by + // CodeQL when mimicking clang + return l1; // COMPLIANT } std::int32_t test_return() {