[clang] [clang-tools-extra] thread-safety: Support the new capability-based names for all related attributes. (PR #99919)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 24 08:11:44 PDT 2024


================
@@ -77,15 +77,15 @@ CoroutineHostileRAIICheck::CoroutineHostileRAIICheck(StringRef Name,
 
 void CoroutineHostileRAIICheck::registerMatchers(MatchFinder *Finder) {
   // A suspension happens with co_await or co_yield.
-  auto ScopedLockable = varDecl(hasType(hasCanonicalType(hasDeclaration(
-                                    hasAttr(attr::Kind::ScopedLockable)))))
-                            .bind("scoped-lockable");
+  auto ScopedCapability = varDecl(hasType(hasCanonicalType(hasDeclaration(
+                                      hasAttr(attr::Kind::ScopedCapability)))))
+                              .bind("scoped-lockable");
----------------
AaronBallman wrote:

Should we rename the binding name as well (and update its uses)?

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


More information about the cfe-commits mailing list