[clang] [Analyzer] Support RefAllowingPartiallyDestroyed and RefPtrAllowingPartiallyDestroyed (PR #82209)

Ryosuke Niwa via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 20 17:09:24 PST 2024


================
@@ -103,15 +103,18 @@ std::optional<bool> isRefCountable(const CXXRecordDecl* R)
   return hasRef && hasDeref;
 }
 
+bool isRefType(const std::string &name) {
+  return name == "Ref" || name == "RefAllowingPartiallyDestroyed" ||
+         name == "RefPtr" || name == "RefPtrAllowingPartiallyDestroyed";
+}
+
 bool isCtorOfRefCounted(const clang::FunctionDecl *F) {
   assert(F);
   const auto &FunctionName = safeGetName(F);
----------------
rniwa wrote:

So we want to explicitly say `std::string &`?

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


More information about the cfe-commits mailing list