File tree Expand file tree Collapse file tree
common/test/rules/nullptrnottheonlyformofthenullpointerconstant 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 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. |
Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ namespace use_as_template_parameter_type {
9090 * parameter
9191 */
9292namespace use_as_template_parameter_default_value {
93- class A1 { // COMPLIANT[False positive]
93+ class A1 { // COMPLIANT
9494 static const int a = 42 ;
9595 };
9696
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