[clang] 49c22e3 - Thread Safety Analysis: Improve comments of LockErrorKind

Marco Elver via cfe-commits cfe-commits at lists.llvm.org
Fri May 9 11:15:29 PDT 2025


Author: Marco Elver
Date: 2025-05-09T20:14:30+02:00
New Revision: 49c22e3ee147326668aa0b2097f857d0b0c2a81e

URL: https://github.com/llvm/llvm-project/commit/49c22e3ee147326668aa0b2097f857d0b0c2a81e
DIFF: https://github.com/llvm/llvm-project/commit/49c22e3ee147326668aa0b2097f857d0b0c2a81e.diff

LOG: Thread Safety Analysis: Improve comments of LockErrorKind

Move documentation inline and add missing documentation for
LEK_NotLockedAtEndOfFunction.

NFC.

Factored out from: https://github.com/llvm/llvm-project/pull/137133

Added: 
    

Modified: 
    clang/include/clang/Analysis/Analyses/ThreadSafety.h

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/Analysis/Analyses/ThreadSafety.h b/clang/include/clang/Analysis/Analyses/ThreadSafety.h
index 20b75c46593e0..65a91483562e0 100644
--- a/clang/include/clang/Analysis/Analyses/ThreadSafety.h
+++ b/clang/include/clang/Analysis/Analyses/ThreadSafety.h
@@ -94,16 +94,14 @@ enum AccessKind {
 
 /// This enum distinguishes between 
diff erent situations where we warn due to
 /// inconsistent locking.
-/// \enum SK_LockedSomeLoopIterations -- a mutex is locked for some but not all
-/// loop iterations.
-/// \enum SK_LockedSomePredecessors -- a mutex is locked in some but not all
-/// predecessors of a CFGBlock.
-/// \enum SK_LockedAtEndOfFunction -- a mutex is still locked at the end of a
-/// function.
 enum LockErrorKind {
+  /// A capability is locked for some but not all loop iterations.
   LEK_LockedSomeLoopIterations,
+  /// A capability is locked in some but not all predecessors of a CFGBlock.
   LEK_LockedSomePredecessors,
+  /// A capability is still locked at the end of a function.
   LEK_LockedAtEndOfFunction,
+  /// Expecting a capability to be held at the end of function.
   LEK_NotLockedAtEndOfFunction
 };
 


        


More information about the cfe-commits mailing list