[PATCH] D81352: Thread safety analysis: Add note for double unlock
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 8 06:31:04 PDT 2020
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM aside from a nit.
================
Comment at: clang/include/clang/Analysis/Analyses/ThreadSafety.h:111
/// \param Loc -- The SourceLocation of the Unlock
+ /// \param LocPreviousUnlock -- Optionally the location of a previous Unlock.
virtual void handleUnmatchedUnlock(StringRef Kind, Name LockName,
----------------
The parameter itself isn't optional, so the "optionally" seems a bit strange to me. I think it should say, `If the source location is valid, it represents the location of a previous Unlock`, or rework the interface to use an `llvm::Optional`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81352/new/
https://reviews.llvm.org/D81352
More information about the cfe-commits
mailing list