[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


================
@@ -81,26 +81,25 @@ static bool isCalleeArrow(const Expr *E) {
   return ME ? ME->isArrow() : false;
 }
 
-static StringRef ClassifyDiagnostic(const CapabilityAttr *A) {
-  return A->getName();
-}
-
-static StringRef ClassifyDiagnostic(QualType VDT) {
+static CapabilityExpr makeCapabilityExpr(const til::SExpr *E, QualType VDT,
----------------
aaronpuchert wrote:

Same as for `createThisPlaceholder`: at this point we don't know if we have a capability yet. Probably better to produce a `pair<StringRef, bool>`.

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


More information about the cfe-commits mailing list