mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
Query cpp/unused-static-variable was producing incorrect results for constexpr variables
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user