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

Aaron Puchert via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 24 17:12:51 PDT 2025


================
@@ -1831,15 +1852,15 @@ void BuildLockset::handleCall(const Expr *Exp, const NamedDecl *D,
     assert(!Self);
     const auto *TagT = Exp->getType()->getAs<TagType>();
     if (D->hasAttrs() && TagT && Exp->isPRValue()) {
-      std::pair<til::LiteralPtr *, StringRef> Placeholder =
-          Analyzer->SxBuilder.createThisPlaceholder(Exp);
+      auto Placeholder = Analyzer->SxBuilder.createThisPlaceholder(Exp);
----------------
aaronpuchert wrote:

I'd like to keep an explicit type here for readability. As an alternative, use the typed `std::get`, i.e. `std::get<StringRef>`.

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


More information about the cfe-commits mailing list