[PATCH] D81352: Thread safety analysis: Add note for double unlock

Aaron Puchert via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 8 07:38:26 PDT 2020


aaronpuchert marked 2 inline comments as done.
aaronpuchert added inline comments.


================
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,
----------------
aaron.ballman wrote:
> 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`.
The former (not available = invalid) is what I intended, so I'll rephrase this.


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