File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
cpp/common/test/rules/deadcode Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 1414| test.cpp:79:17:80:3 | { ... } | This statement is dead code. |
1515| test.cpp:85:3:85:44 | declaration | This statement is dead code. |
1616| test.cpp:87:3:87:30 | declaration | This statement is dead code. |
17+ | test.cpp:90:3:90:50 | declaration | This statement is dead code. |
Original file line number Diff line number Diff line change @@ -86,5 +86,8 @@ int test_dead_code(int x) {
8686
8787 constexpr int unused_int{2 }; // NON_COMPLIANT
8888
89- return live5 + live6; // COMPLIANT
90- }
89+ constexpr int constexpr_used_array[]{3 , 4 , 5 }; // COMPLIANT
90+ constexpr int constexpr_unused_array[]{0 , 1 , 2 }; // NON_COMPLIANT
91+
92+ return live5 + live6 + constexpr_used_array[1 ]; // COMPLIANT
93+ }
You can’t perform that action at this time.
0 commit comments