[clang] [alpha.webkit.UncountedCallArgsChecker] Improve the warning text (PR #202724)

Balázs Benics via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 19 06:30:57 PDT 2026


================
@@ -299,6 +299,25 @@ bool RetainTypeChecker::isUnretained(const QualType QT, bool ignoreARC) {
   return RecordlessTypes.contains(QT.getTypePtr());
 }
 
+const TypedefDecl *RetainTypeChecker::getCanonicalDecl(QualType QT) {
+  if (auto *TT = dyn_cast_or_null<TypedefType>(QT.getTypePtrOrNull())) {
+    if (auto *TD = dyn_cast<TypedefDecl>(TT->getDecl()))
+      return TD;
+  }
+  QT = QT.getCanonicalType();
+  auto PointeeQT = QT.getCanonicalType()->getPointeeType();
+  auto *PointeeType = PointeeQT.getTypePtrOrNull();
+  if (!PointeeType)
+    return nullptr;
+  auto *RD = dyn_cast<RecordType>(PointeeType);
+  if (!RD)
+    return nullptr;
+  auto It = CFPointees.find(RD);
+  if (It == CFPointees.end())
+    return nullptr;
+  return It->second;
----------------
steakhal wrote:

```suggestion
  return CFPointees.lookup(RD);
```

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


More information about the cfe-commits mailing list