C++: Add comments about the temporary exclusions.

This commit is contained in:
Geoffrey White
2020-11-11 17:32:11 +00:00
parent 0790fb6324
commit 2aa6ff6239

View File

@@ -58,9 +58,9 @@ where
not exists(AsmStmt s | f = s.getEnclosingFunction()) and
not v.getAnAttribute().getName() = "unused" and
not any(ErrorExpr e).getEnclosingFunction() = f and // unextracted expr may use `v`
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
l.getEnclosingFunction() = f and
not exists(l.getValue())
) and
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
select v, "Variable " + v.getName() + " is not used"