File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
cpp/autosar/test/rules/A0-1-1 Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 1212| test.cpp:94:11:94:17 | new | Definition of $@ is unused. | test.cpp:94:6:94:7 | b4 | b4 |
1313| test.cpp:95:11:95:17 | 0 | Definition of $@ is unused. | test.cpp:95:6:95:7 | b5 | b5 |
1414| test.cpp:103:11:103:17 | 0 | Definition of $@ is unused. | test.cpp:103:6:103:7 | c5 | c5 |
15+ | test.cpp:132:43:132:45 | {...} | Definition of $@ is unused. | test.cpp:132:7:132:18 | unused_array | unused_array |
16+ | test.cpp:134:29:134:31 | 0 | Definition of $@ is unused. | test.cpp:134:17:134:26 | unused_int | unused_int |
Original file line number Diff line number Diff line change @@ -123,4 +123,16 @@ template <typename T> void test_range_based_for_loop_template() {
123123 // template
124124 elem;
125125 }
126- }
126+ }
127+
128+ #include < cstdint>
129+
130+ std::int32_t test_constexpr_array_size () {
131+ constexpr int constexpr_array_size = 7 ; // COMPLIANT
132+ int unused_array[constexpr_array_size] = {}; // NON_COMPLIANT
133+
134+ constexpr int unused_int = {}; // NON_COMPLIANT
135+
136+ std::int32_t used_array[] = {-1 , 0 , 1 }; // COMPLIANT
137+ return used_array[1 ];
138+ }
You can’t perform that action at this time.
0 commit comments