You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`A0-1-3` - Considered the following additional use cases while reporting a local function as "unused".
2
+
- The address of a function is taken
3
+
- The operand of an expression in an unevaluated context
4
+
- Functions marked with [[maybe_unused]]
5
+
- Explicitly deleted functions e.g. =delete
6
+
- Use of any overload of a function in an overload set constitute a use of all members of the set. An overload set is a set of functions with the same name that differ in the number, type and/or qualifiers of their parameters, and, for the purpose of this query, are limited to functions which are declared in the same scope (namespace or class).
Copy file name to clipboardExpand all lines: rule_packages/cpp/DeadCode.json
+4-1Lines changed: 4 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -67,7 +67,10 @@
67
67
"tags": [
68
68
"readability",
69
69
"maintainability"
70
-
]
70
+
],
71
+
"implementation_scope": {
72
+
"description": "Use of any overload of a function in an overload set constitute a use of all members of the set. An overload set is a set of functions with the same name that differ in the number, type and/or qualifiers of their parameters, and, for the purpose of this query, are limited to functions which are declared in the same scope (namespace or class). Functions defined in anonymous (unnamed) namespaces and global namespaces are therefore not currently considered to be part of the same overload set."
73
+
}
71
74
}
72
75
],
73
76
"title": "Every function defined in an anonymous namespace, or static function with internal linkage, or private member function shall be used."
0 commit comments