Query cpp/unused-static-variable was producing incorrect results for constexpr variables

This commit is contained in:
Rachel Mant
2019-10-31 22:50:44 +00:00
committed by GitHub
parent d03aecaa98
commit 413f49bba5

View File

@@ -21,6 +21,7 @@ from Variable v
where
v.isStatic() and
v.hasDefinition() and
not v.isConstexpr() and
not exists(VariableAccess a | a.getTarget() = v) and
not v instanceof MemberVariable and
not declarationHasSideEffects(v) and