Skip to content

Commit 426565a

Browse files
authored
Merge pull request #2239 from DX-MON/master
Query cpp/unused-static-variable was producing incorrect results for constexpr variables
2 parents e8e2f7b + 413f49b commit 426565a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cpp/ql/src/Best Practices/Unused Entities/UnusedStaticVariables.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ from Variable v
2121
where
2222
v.isStatic() and
2323
v.hasDefinition() and
24+
not v.isConstexpr() and
2425
not exists(VariableAccess a | a.getTarget() = v) and
2526
not v instanceof MemberVariable and
2627
not declarationHasSideEffects(v) and

0 commit comments

Comments
 (0)