We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
cpp/unused-local-variable
1 parent 3fed59f commit 4f49f9dCopy full SHA for 4f49f9d
cpp/ql/src/Best Practices/Unused Entities/UnusedLocals.ql
@@ -58,11 +58,5 @@ where
58
not exists(AsmStmt s | f = s.getEnclosingFunction()) and
59
not v.getAnAttribute().getName() = "unused" and
60
not any(ErrorExpr e).getEnclosingFunction() = f and // unextracted expr may use `v`
61
- not exists(
62
- Literal l // this case can be removed when the `myFunction2( [obj](){} );` test case doesn't depend on this exclusion
63
- |
64
- l.getEnclosingFunction() = f and
65
- not exists(l.getValue())
66
- ) and
67
not any(ConditionDeclExpr cde).getEnclosingFunction() = f // this case can be removed when the `if (a = b; a)` test case doesn't depend on this exclusion
68
select v, "Variable " + v.getName() + " is not used"
0 commit comments