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 14
14
| test.cpp:79:17:80:3 | { ... } | This statement is dead code. |
15
15
| test.cpp:85:3:85:44 | declaration | This statement is dead code. |
16
16
| 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) {
86
86
87
87
constexpr int unused_int{2 }; // NON_COMPLIANT
88
88
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