[clang] [Analyzer] Support RefAllowingPartiallyDestroyed and RefPtrAllowingPartiallyDestroyed (PR #82209)
Artem Dergachev via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 20 17:01:30 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);
----------------
haoNoQ wrote:
I think folks don't want you to use `auto` in such cases (https://llvm.org/docs/CodingStandards.html#use-auto-type-deduction-to-make-code-more-readable).
https://github.com/llvm/llvm-project/pull/82209
More information about the cfe-commits
mailing list