Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0790fb6 commit 2aa6ff6Copy full SHA for 2aa6ff6
1 file changed
cpp/ql/src/Best Practices/Unused Entities/UnusedLocals.ql
@@ -58,9 +58,9 @@ 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(Literal l |
+ not exists(Literal l | // this case can be removed when the `myFunction2( [obj](){} );` test case doesn't depend on this exclusion
62
l.getEnclosingFunction() = f and
63
not exists(l.getValue())
64
) and
65
- not any(ConditionDeclExpr cde).getEnclosingFunction() = f
+ 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
66
select v, "Variable " + v.getName() + " is not used"
0 commit comments