[clang] [alpha.webkit.UncountedCallArgsChecker] Allow protector functions in Objective-C++ (PR #108184)
Artem Dergachev via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 11 11:31:22 PDT 2024
================
@@ -143,6 +143,16 @@ bool isReturnValueRefCounted(const clang::FunctionDecl *F) {
return false;
}
+std::optional<bool> isUncounted(const QualType T) {
+ if (auto *Subst = dyn_cast<SubstTemplateTypeParmType>(T)) {
+ if (auto *Decl = Subst->getAssociatedDecl()) {
+ if (isRefType(safeGetName(Decl)))
+ return false;
+ }
+ }
+ return isUncounted(T->getAsCXXRecordDecl());
+}
+
std::optional<bool> isUncounted(const CXXRecordDecl* Class)
----------------
haoNoQ wrote:
Should we force every checker to use the new function now that we know about this cornercase?
https://github.com/llvm/llvm-project/pull/108184
More information about the cfe-commits
mailing list