We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 15801d9 commit 468eabdCopy full SHA for 468eabd
2 files changed
cpp/common/test/rules/deadcode/DeadCode.expected
@@ -14,3 +14,4 @@
14
| test.cpp:79:17:80:3 | { ... } | This statement is dead code. |
15
| test.cpp:85:3:85:44 | declaration | This statement is dead code. |
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. |
cpp/common/test/rules/deadcode/test.cpp
@@ -86,5 +86,8 @@ int test_dead_code(int x) {
86
87
constexpr int unused_int{2}; // NON_COMPLIANT
88
89
- return live5 + live6; // COMPLIANT
90
-}
+ constexpr int constexpr_used_array[]{3, 4, 5}; // COMPLIANT
+ constexpr int constexpr_unused_array[]{0, 1, 2}; // NON_COMPLIANT
91
+
92
+ return live5 + live6 + constexpr_used_array[1]; // COMPLIANT
93
+}
0 commit comments