================
@@ -1262,21 +1261,52 @@ class ThreadSafetyAnalyzer {
   void getMutexIDs(CapExprSet &Mtxs, AttrType *Attr, const Expr *Exp,
                    const NamedDecl *D, til::SExpr *Self = nullptr);
 
-  template <class AttrType>
-  void getMutexIDs(CapExprSet &Mtxs, AttrType *Attr, const Expr *Exp,
-                   const NamedDecl *D,
-                   const CFGBlock *PredBlock, const CFGBlock *CurrBlock,
-                   Expr *BrE, bool Neg);
+  /// Intermediate state for decodeTrylockBranch.
+  struct TrylockDecode {
+    /// The try-acquire call reached in the AST walk.
+    const CallExpr *TrylockCall = nullptr;
+    /// The condition tests the negated call result.
+    bool Negate = false;
+  };
+
+  void decodeTrylockCond(const Stmt *Cond, LocalVarContext C, TrylockDecode 
&D);
+
+  /// How one edge of a terminator's branch resolves one capability of the
+  /// branched-on try-acquire call.
+  enum class CapResolution : uint8_t {
----------------
vtjnash wrote:

Yes, both are intended to get used later in bug fixes, since right now the 
implementation assumes that proving the positive also proves the negative, but 
requires reworking some of that plumbing around more than just the true/false 
return.

https://github.com/llvm/llvm-project/pull/220634
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to