[clang] Thread Safety Analysis: Support reentrant capabilities (PR #137133)

Aaron Puchert via cfe-commits cfe-commits at lists.llvm.org
Sat Apr 26 12:08:37 PDT 2025


================
@@ -388,7 +395,7 @@ class SExprBuilder {
   til::LiteralPtr *createVariable(const VarDecl *VD);
 
   // Create placeholder for this: we don't know the VarDecl on construction yet.
-  std::pair<til::LiteralPtr *, StringRef>
+  std::pair<til::LiteralPtr *, CapabilityExpr>
----------------
aaronpuchert wrote:

Nice idea, but I'm not sure if it's conceptually correct. We'll create these also for objects that are not a capability, we only create the `CapabilityExpr` when we see it has a `ScopedLockableAttr`.

https://github.com/llvm/llvm-project/pull/137133


More information about the cfe-commits mailing list