Skip to content

Commit

Permalink
C++: Reinstate accidentally-deleted commend
Browse files Browse the repository at this point in the history
  • Loading branch information
calumgrant committed Oct 1, 2024
1 parent a9b3c0d commit b4e9131
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cpp/ql/src/Best Practices/Unused Entities/UnusedLocals.ql
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ where
not exists(DeclStmt ds | ds.getADeclaration() = v and ds.isInMacroExpansion()) and // variable declared in a macro expansion
not declarationHasSideEffects(v) and
not exists(AsmStmt s | f = s.getEnclosingFunction()) and
not v.getAnAttribute().getName() = "unused" and
not v.getAnAttribute().getName() = "unused" and // unextracted expr may use `v`
not f.hasErrors()
select v, "Variable " + v.getName() + " is not used."

0 comments on commit b4e9131

Please sign in to comment.