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
Copy file name to clipboardExpand all lines: rule_packages/c/DeadCode.json
+14-2Lines changed: 14 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -17,8 +17,7 @@
17
17
"maintainability"
18
18
],
19
19
"implementation_scope": {
20
-
"description": "This query reports ...",
21
-
"items": []
20
+
"description": "This query reports basic blocks in the program which are unreachable. For basic blocks within templates, the block is only consider unreachable if it is unreachable in all templates. Code generated by macros is ignored for this query, because it may be the case that basic blocks are reachable only in some expansions."
"description": "This query identifies dead statements in the program of the following kinds:",
45
+
"items": [
46
+
"Declarations of a non-static stack variable whose initializing expression is pure (i.e. has no side-effects) and that is never subsequently accessed in live code.",
47
+
"Blocks that contain only dead statements.",
48
+
"Do loops whose condition is pure, and whose body contains only dead statements.",
49
+
"If statements whose condition is pure, and whose then and else clauses (where they exist) only contain dead statements.",
50
+
"Label statements to which the code never jumps.",
51
+
"While loops whose condition is pure, and whose body contains only dead statements.",
52
+
"Expression statements whose expressions are pure.",
53
+
"Writes to a non-static stack variable that is never subsequently read in live code."
0 commit comments