File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed
Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change 1+ /**
2+ * @id cpp/misra/unused-type-with-limited-visibility
3+ * @name RULE-0-2-3: Types with limited visibility should be used at least once
4+ * @description Types that are unused with limited visibility are unnecessary and should either be
5+ * removed or may indicate a developer mistake.
6+ * @kind problem
7+ * @precision very-high
8+ * @problem.severity error
9+ * @tags external/misra/id/rule-0-2-3
10+ * scope/single-translation-unit
11+ * maintainability
12+ * correctness
13+ * external/misra/enforcement/decidable
14+ * external/misra/obligation/advisory
15+ */
16+
117import cpp
218import codingstandards.cpp.misra
319import codingstandards.cpp.types.Uses
Original file line number Diff line number Diff line change @@ -158,9 +158,7 @@ void test_alias_template() { AliasTemplate2<int> l1; }
158158
159159// Test case 13: Primary class template usage
160160namespace {
161- template <typename T> struct D1 {
162- T m1;
163- }; // COMPLIANT - D1<int> is used
161+ template <typename T> struct D1 { T m1; }; // COMPLIANT - D1<int> is used
164162
165163void test_class_template_usage () { D1<int > l1{42 }; }
166164} // namespace
You can’t perform that action at this time.
0 commit comments