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

>From cc9344cd0cbddfbace609175536fc69a7995e178 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa <[email protected]>
Date: Tue, 9 Jun 2026 09:33:46 -0700
Subject: [PATCH] [alpha.webkit.UncountedCallArgsChecker] Improve the warning
 text

This PR improves UncountedCallArgsChecker and its variant's warning message
to explicitly state the argument expression, the qualified callee type as
well as the type which needs to be kept alive.
---
 .../Checkers/WebKit/ASTUtils.cpp              |  14 ++
 .../StaticAnalyzer/Checkers/WebKit/ASTUtils.h |   3 +
 .../Checkers/WebKit/PtrTypesSemantics.cpp     |  21 ++-
 .../Checkers/WebKit/PtrTypesSemantics.h       |   3 +-
 .../WebKit/RawPtrRefCallArgsChecker.cpp       | 137 ++++++++++++++----
 .../WebKit/RawPtrRefMemberChecker.cpp         |  23 +--
 .../Checkers/WebKit/binding-to-refptr.cpp     |   4 +-
 .../WebKit/call-args-checked-const-member.cpp |   8 +-
 .../Checkers/WebKit/call-args-checked-ptr.cpp |  42 +++---
 .../Checkers/WebKit/call-args-checked.cpp     |   8 +-
 .../WebKit/call-args-counted-const-member.cpp |  10 +-
 .../call-args-loop-init-opaque-value.cpp      |   2 +-
 .../WebKit/call-args-safe-functions.cpp       |   2 +-
 .../WebKit/call-args-wtf-containers.cpp       |  16 +-
 .../Analysis/Checkers/WebKit/call-args.cpp    |  68 ++++-----
 .../ref-countable-default-arg-nullptr.cpp     |   4 +-
 .../Checkers/WebKit/unchecked-call-arg.cpp    |   2 +-
 .../Checkers/WebKit/uncounted-obj-arg.cpp     |  85 +++++------
 .../Checkers/WebKit/uncounted-obj-arg.mm      |   2 +-
 .../WebKit/uncounted-obj-const-v-muable.cpp   |   4 +-
 .../WebKit/unretained-call-args-arc.mm        |   6 +-
 .../WebKit/unretained-call-args-member.mm     |  16 +-
 .../Checkers/WebKit/unretained-call-args.mm   |  96 ++++++------
 .../Checkers/WebKit/unretained-obj-arg.mm     |   4 +-
 24 files changed, 345 insertions(+), 235 deletions(-)

diff --git a/clang/lib/StaticAnalyzer/Checkers/WebKit/ASTUtils.cpp 
b/clang/lib/StaticAnalyzer/Checkers/WebKit/ASTUtils.cpp
index 0094c06476d77..5fd2ff87bce8d 100644
--- a/clang/lib/StaticAnalyzer/Checkers/WebKit/ASTUtils.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/WebKit/ASTUtils.cpp
@@ -388,6 +388,20 @@ bool isAllocInit(const Expr *E, const Expr **InnerExpr) {
   return false;
 }
 
+ObjCInterfaceDecl *getObjCDeclFromObjCPtr(const Type *TypePtr) {
+  auto *PointeeType = TypePtr->getPointeeType().getTypePtrOrNull();
+  if (!PointeeType)
+    return nullptr;
+  auto *Desugared = PointeeType->getUnqualifiedDesugaredType();
+  if (!Desugared)
+    return nullptr;
+  if (auto *ObjCType = dyn_cast<ObjCInterfaceType>(Desugared))
+    return ObjCType->getDecl();
+  if (auto *ObjCType = dyn_cast<ObjCObjectType>(Desugared))
+    return ObjCType->getInterface();
+  return nullptr;
+}
+
 class EnsureFunctionVisitor
     : public ConstStmtVisitor<EnsureFunctionVisitor, bool> {
 public:
diff --git a/clang/lib/StaticAnalyzer/Checkers/WebKit/ASTUtils.h 
b/clang/lib/StaticAnalyzer/Checkers/WebKit/ASTUtils.h
index d0a3e471365e2..fc2c43f33037e 100644
--- a/clang/lib/StaticAnalyzer/Checkers/WebKit/ASTUtils.h
+++ b/clang/lib/StaticAnalyzer/Checkers/WebKit/ASTUtils.h
@@ -81,6 +81,9 @@ bool isExprToGetCheckedPtrCapableMember(const clang::Expr *E);
 /// Sets \p InnerExpr to the inner function call or selector invocation.
 bool isAllocInit(const Expr *E, const Expr **InnerExpr = nullptr);
 
+/// \returns ObjCInterfaceDecl from a pointer type.
+ObjCInterfaceDecl *getObjCDeclFromObjCPtr(const Type *TypePtr);
+
 /// \returns true if E is a CXXMemberCallExpr which returns a const smart
 /// pointer type.
 class EnsureFunctionAnalysis {
diff --git a/clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.cpp 
b/clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.cpp
index cf165796c9695..8cbbbb16aa0d0 100644
--- a/clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.cpp
@@ -284,7 +284,7 @@ void RetainTypeChecker::visitTypedef(const TypedefDecl *TD) 
{
   for (auto *Redecl : RT->getDecl()->getMostRecentDecl()->redecls()) {
     if (Redecl->getAttr<ObjCBridgeAttr>() ||
         Redecl->getAttr<ObjCBridgeMutableAttr>()) {
-      CFPointees.insert(RT);
+      CFPointees.insert(std::make_pair(RT, TD));
       return;
     }
   }
@@ -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;
+}
+
 std::optional<bool> isUncounted(const CXXRecordDecl* Class)
 {
   // Keep isRefCounted first as it's cheaper.
diff --git a/clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.h 
b/clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.h
index a2fd12656d391..4e548c44c6bb9 100644
--- a/clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.h
+++ b/clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.h
@@ -80,7 +80,7 @@ std::optional<bool> isUnchecked(const clang::QualType T);
 /// An inter-procedural analysis facility that detects CF types with the
 /// underlying pointer type.
 class RetainTypeChecker {
-  llvm::DenseSet<const RecordType *> CFPointees;
+  llvm::DenseMap<const RecordType *, const TypedefDecl *> CFPointees;
   llvm::DenseSet<const Type *> RecordlessTypes;
   bool IsARCEnabled{false};
   bool DefaultSynthProperties{true};
@@ -91,6 +91,7 @@ class RetainTypeChecker {
   bool isUnretained(const QualType, bool ignoreARC = false);
   bool isARCEnabled() const { return IsARCEnabled; }
   bool defaultSynthProperties() const { return DefaultSynthProperties; }
+  const TypedefDecl *getCanonicalDecl(QualType);
 };
 
 /// \returns true if \p Class is ref-countable AND not ref-counted, false if
diff --git 
a/clang/lib/StaticAnalyzer/Checkers/WebKit/RawPtrRefCallArgsChecker.cpp 
b/clang/lib/StaticAnalyzer/Checkers/WebKit/RawPtrRefCallArgsChecker.cpp
index 7fee003f6f4d0..dc2deed1816e9 100644
--- a/clang/lib/StaticAnalyzer/Checkers/WebKit/RawPtrRefCallArgsChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/WebKit/RawPtrRefCallArgsChecker.cpp
@@ -14,6 +14,7 @@
 #include "clang/AST/DynamicRecursiveASTVisitor.h"
 #include "clang/Analysis/DomainSpecific/CocoaConventions.h"
 #include "clang/Basic/SourceLocation.h"
+#include "clang/Lex/Lexer.h"
 #include "clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h"
 #include "clang/StaticAnalyzer/Core/BugReporter/BugReporter.h"
 #include "clang/StaticAnalyzer/Core/BugReporter/BugType.h"
@@ -47,7 +48,7 @@ class RawPtrRefCallArgsChecker
   virtual bool isSafePtrType(const QualType type) const = 0;
   virtual bool isSafeExpr(const Expr *) const { return false; }
   virtual bool isSafeDecl(const Decl *) const { return false; }
-  virtual const char *ptrKind() const = 0;
+  virtual const char *typeName() const = 0;
 
   void checkASTDecl(const TranslationUnitDecl *TUD, AnalysisManager &MGR,
                     BugReporter &BRArg) const {
@@ -118,14 +119,14 @@ class RawPtrRefCallArgsChecker
           isa<CXXOperatorCallExpr>(CE) && isa_and_nonnull<CXXMethodDecl>(F);
 
       if (auto *MemberCallExpr = dyn_cast<CXXMemberCallExpr>(CE))
-        checkThisArg(MemberCallExpr, D);
+        checkThisArg(F, MemberCallExpr, D);
 
       if (ArgIdx) {
         auto *Arg = CE->getArg(0);
         QualType ArgType = Arg->getType().getCanonicalType();
         std::optional<bool> IsUnsafe = isUnsafeType(ArgType);
         if (IsUnsafe && *IsUnsafe && !isPtrOriginSafe(Arg))
-          reportBugOnThis(Arg, D);
+          reportBugOnThis(F, Arg, D);
       }
 
       for (auto P = F->param_begin();
@@ -133,11 +134,11 @@ class RawPtrRefCallArgsChecker
         // TODO: attributes.
         // if ((*P)->hasAttr<SafeRefCntblRawPtrAttr>())
         //  continue;
-        checkArg(CE->getArg(ArgIdx), (*P)->getType(), *P, D);
+        checkArg(F, CE->getArg(ArgIdx), (*P)->getType(), *P, D);
       }
       for (; ArgIdx < CE->getNumArgs(); ++ArgIdx) {
         auto *Arg = CE->getArg(ArgIdx);
-        checkArg(Arg, Arg->getType(), nullptr, D);
+        checkArg(F, Arg, Arg->getType(), nullptr, D);
       }
     }
   }
@@ -153,15 +154,15 @@ class RawPtrRefCallArgsChecker
       if (auto *FnType = Decl->getFunctionType()) {
         if (auto *ProtoType = dyn_cast<FunctionProtoType>(FnType)) {
           if (auto *MemberCallExpr = dyn_cast<CXXMemberCallExpr>(CE))
-            checkThisArg(MemberCallExpr, D);
+            checkThisArg(nullptr, MemberCallExpr, D);
           unsigned ArgIdx = 0;
           for (auto PT = ProtoType->param_type_begin();
                PT < ProtoType->param_type_end() && ArgIdx < CE->getNumArgs();
                ++PT, ++ArgIdx)
-            checkArg(CE->getArg(ArgIdx), *PT, nullptr, D);
+            checkArg(nullptr, CE->getArg(ArgIdx), *PT, nullptr, D);
           for (; ArgIdx < CE->getNumArgs(); ++ArgIdx) {
             auto *Arg = CE->getArg(ArgIdx);
-            checkArg(Arg, Arg->getType(), nullptr, D);
+            checkArg(nullptr, Arg, Arg->getType(), nullptr, D);
           }
         }
       }
@@ -188,7 +189,7 @@ class RawPtrRefCallArgsChecker
         auto SelectorName = E->getSelector().getNameForSlot(0);
         if (SelectorName == "isEqual" || SelectorName == "isEqualToString")
           return;
-        reportBugOnReceiver(Receiver, D);
+        reportBugOnReceiver(E->getMethodDecl(), Receiver, D);
       }
     }
 
@@ -207,11 +208,12 @@ class RawPtrRefCallArgsChecker
         continue;
       if (isPtrOriginSafe(Arg))
         continue;
-      reportBug(Arg, Param, D);
+      reportBug(MethodDecl, Arg, Param, D);
     }
   }
 
-  void checkThisArg(const CXXMemberCallExpr *MemberCallExpr,
+  void checkThisArg(const NamedDecl *Callee,
+                    const CXXMemberCallExpr *MemberCallExpr,
                     const Decl *DeclWithIssue) const {
     if (auto *MD = MemberCallExpr->getMethodDecl()) {
       auto name = safeGetName(MD);
@@ -230,11 +232,11 @@ class RawPtrRefCallArgsChecker
     if (isPtrOriginSafe(ThisExpr))
       return;
 
-    reportBugOnThis(MemberCallExpr, DeclWithIssue);
+    reportBugOnThis(Callee, ThisExpr, DeclWithIssue);
   }
 
-  void checkArg(const Expr *Arg, QualType ParamType, const ParmVarDecl *Param,
-                const Decl *DeclWithIssue) const {
+  void checkArg(const NamedDecl *Callee, const Expr *Arg, QualType ParamType,
+                const ParmVarDecl *Param, const Decl *DeclWithIssue) const {
     std::optional<bool> IsUncounted = isUnsafePtr(ParamType);
     if (!IsUncounted || !(*IsUncounted))
       return;
@@ -245,7 +247,7 @@ class RawPtrRefCallArgsChecker
     if (isPtrOriginSafe(Arg))
       return;
 
-    reportBug(Arg, Param, DeclWithIssue);
+    reportBug(Callee, Arg, Param, DeclWithIssue);
   }
 
   bool isPtrOriginSafe(const Expr *Arg) const {
@@ -378,8 +380,8 @@ class RawPtrRefCallArgsChecker
             ClsName.ends_with("String"));
   }
 
-  void reportBug(const Expr *CallArg, const ParmVarDecl *Param,
-                 const Decl *DeclWithIssue) const {
+  void reportBug(const NamedDecl *Callee, const Expr *CallArg,
+                 const ParmVarDecl *Param, const Decl *DeclWithIssue) const {
     assert(CallArg);
 
     SmallString<100> Buf;
@@ -387,11 +389,29 @@ class RawPtrRefCallArgsChecker
 
     const std::string paramName = safeGetName(Param);
     Os << "Call argument";
+    printArgument(Os, CallArg, DeclWithIssue);
     if (!paramName.empty()) {
       Os << " for parameter ";
       printQuotedQualifiedName(Os, Param);
     }
-    Os << " is " << ptrKind() << " and unsafe.";
+    if (Callee) {
+      Os << " of ";
+      printQuotedQualifiedName(Os, Callee);
+    }
+    Os << " is a ";
+    auto *ArgType = CallArg->getType().getTypePtr();
+
+    if (printPointer(Os, ArgType) == PrintDeclKind::Pointer) {
+      assert(RTC);
+      if (auto *Decl = RTC->getCanonicalDecl(CallArg->getType()))
+        printQuotedQualifiedName(Os, Decl);
+      else {
+        auto Typedef = ArgType->getAs<TypedefType>();
+        assert(Typedef);
+        printQuotedQualifiedName(Os, Typedef->getDecl());
+      }
+    } else
+      printType(Os, CallArg->getType());
 
     bool usesDefaultArgValue = isa<CXXDefaultArgExpr>(CallArg) && Param;
     const SourceLocation SrcLocToReport =
@@ -405,15 +425,23 @@ class RawPtrRefCallArgsChecker
     BR->emitReport(std::move(Report));
   }
 
-  void reportBugOnThis(const Expr *CallArg, const Decl *DeclWithIssue) const {
+  void reportBugOnThis(const NamedDecl *Callee, const Expr *CallArg,
+                       const Decl *DeclWithIssue) const {
     assert(CallArg);
 
     const SourceLocation SrcLocToReport = CallArg->getSourceRange().getBegin();
 
     SmallString<100> Buf;
     llvm::raw_svector_ostream Os(Buf);
-    Os << "Call argument for 'this' parameter is " << ptrKind();
-    Os << " and unsafe.";
+    Os << "Call argument";
+    printArgument(Os, CallArg, DeclWithIssue);
+    Os << " for 'this' parameter";
+    if (Callee) {
+      Os << " of ";
+      printQuotedQualifiedName(Os, Callee);
+    }
+    Os << " is a raw pointer to " << typeName();
+    printType(Os, CallArg->getType());
 
     PathDiagnosticLocation BSLoc(SrcLocToReport, BR->getSourceManager());
     auto Report = std::make_unique<BasicBugReport>(Bug, Os.str(), BSLoc);
@@ -422,7 +450,7 @@ class RawPtrRefCallArgsChecker
     BR->emitReport(std::move(Report));
   }
 
-  void reportBugOnReceiver(const Expr *CallArg,
+  void reportBugOnReceiver(const NamedDecl *Callee, const Expr *CallArg,
                            const Decl *DeclWithIssue) const {
     assert(CallArg);
 
@@ -430,7 +458,14 @@ class RawPtrRefCallArgsChecker
 
     SmallString<100> Buf;
     llvm::raw_svector_ostream Os(Buf);
-    Os << "Receiver is " << ptrKind() << " and unsafe.";
+    Os << "Receiver";
+    printArgument(Os, CallArg, DeclWithIssue);
+    if (Callee) {
+      Os << " of ";
+      printQuotedQualifiedName(Os, Callee);
+    }
+    Os << " is a raw pointer to " << typeName();
+    printType(Os, CallArg->getType());
 
     PathDiagnosticLocation BSLoc(SrcLocToReport, BR->getSourceManager());
     auto Report = std::make_unique<BasicBugReport>(Bug, Os.str(), BSLoc);
@@ -438,6 +473,47 @@ class RawPtrRefCallArgsChecker
     Report->setDeclWithIssue(DeclWithIssue);
     BR->emitReport(std::move(Report));
   }
+
+  void printArgument(llvm::raw_svector_ostream &Os, const Expr *Arg,
+                     const Decl *D) const {
+    SmallString<100> Buf;
+    llvm::raw_svector_ostream ArgOs(Buf);
+    Arg->printPretty(ArgOs, /*Helper=*/nullptr,
+                     D->getASTContext().getPrintingPolicy());
+    auto ArgCode = ArgOs.str();
+    if (ArgCode.contains('\n'))
+      return;
+    ArgCode = ArgCode.slice(0, 50);
+    if (ArgCode.size() == 50)
+      Os << " '" << ArgCode << "...'";
+    else
+      Os << " '" << ArgCode << "'";
+  }
+
+  enum class PrintDeclKind { Pointee, Pointer };
+  virtual PrintDeclKind printPointer(llvm::raw_svector_ostream &Os,
+                                     const Type *T) const {
+    T = T->getUnqualifiedDesugaredType();
+    bool IsPtr = isa<PointerType>(T) || isa<ObjCObjectPointerType>(T);
+    Os << "raw " << (IsPtr ? "pointer" : "reference") << " to " << typeName();
+    return PrintDeclKind::Pointee;
+  }
+
+  void printType(llvm::raw_svector_ostream &Os, const QualType QT) const {
+    auto *ArgType = QT.getTypePtr();
+    if (auto *CXXRD = ArgType->getPointeeCXXRecordDecl()) {
+      Os << " ";
+      printQuotedQualifiedName(Os, CXXRD);
+    } else if (auto *ObjCDecl = getObjCDeclFromObjCPtr(ArgType)) {
+      Os << " ";
+      printQuotedQualifiedName(Os, ObjCDecl);
+    } else if (!ArgType->isPointerOrReferenceType()) {
+      if (auto *RD = ArgType->getAsRecordDecl()) {
+        Os << " ";
+        printQuotedQualifiedName(Os, RD);
+      }
+    }
+  }
 };
 
 class UncountedCallArgsChecker final : public RawPtrRefCallArgsChecker {
@@ -462,7 +538,7 @@ class UncountedCallArgsChecker final : public 
RawPtrRefCallArgsChecker {
     return isRefOrCheckedPtrType(type);
   }
 
-  const char *ptrKind() const final { return "uncounted"; }
+  const char *typeName() const final { return "ref-countable type"; }
 };
 
 class UncheckedCallArgsChecker final : public RawPtrRefCallArgsChecker {
@@ -491,7 +567,7 @@ class UncheckedCallArgsChecker final : public 
RawPtrRefCallArgsChecker {
     return isExprToGetCheckedPtrCapableMember(E);
   }
 
-  const char *ptrKind() const final { return "unchecked"; }
+  const char *typeName() const final { return "CheckedPtr capable type"; }
 };
 
 class UnretainedCallArgsChecker final : public RawPtrRefCallArgsChecker {
@@ -523,7 +599,16 @@ class UnretainedCallArgsChecker final : public 
RawPtrRefCallArgsChecker {
     return BR->getSourceManager().isInSystemHeader(D->getLocation());
   }
 
-  const char *ptrKind() const final { return "unretained"; }
+  PrintDeclKind printPointer(llvm::raw_svector_ostream &Os,
+                             const Type *T) const final {
+    if (!isa<ObjCObjectPointerType>(T) && T->getAs<TypedefType>()) {
+      Os << typeName() << " ";
+      return PrintDeclKind::Pointer;
+    }
+    return RawPtrRefCallArgsChecker::printPointer(Os, T);
+  }
+
+  const char *typeName() const final { return "retainable type"; }
 };
 
 } // namespace
diff --git 
a/clang/lib/StaticAnalyzer/Checkers/WebKit/RawPtrRefMemberChecker.cpp 
b/clang/lib/StaticAnalyzer/Checkers/WebKit/RawPtrRefMemberChecker.cpp
index 0e23ae34ea212..a541d021622f5 100644
--- a/clang/lib/StaticAnalyzer/Checkers/WebKit/RawPtrRefMemberChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/WebKit/RawPtrRefMemberChecker.cpp
@@ -6,6 +6,7 @@
 //
 
//===----------------------------------------------------------------------===//
 
+#include "ASTUtils.h"
 #include "DiagOutputUtils.h"
 #include "PtrTypesSemantics.h"
 #include "clang/AST/Decl.h"
@@ -108,24 +109,10 @@ class RawPtrRefMemberChecker
 
     if (auto *MemberCXXRD = MemberType->getPointeeCXXRecordDecl())
       reportBug(Member, MemberType, MemberCXXRD, RD);
-    else if (auto *ObjCDecl = getObjCDecl(MemberType))
+    else if (auto *ObjCDecl = getObjCDeclFromObjCPtr(MemberType))
       reportBug(Member, MemberType, ObjCDecl, RD);
   }
 
-  ObjCInterfaceDecl *getObjCDecl(const Type *TypePtr) const {
-    auto *PointeeType = TypePtr->getPointeeType().getTypePtrOrNull();
-    if (!PointeeType)
-      return nullptr;
-    auto *Desugared = PointeeType->getUnqualifiedDesugaredType();
-    if (!Desugared)
-      return nullptr;
-    if (auto *ObjCType = dyn_cast<ObjCInterfaceType>(Desugared))
-      return ObjCType->getDecl();
-    if (auto *ObjCType = dyn_cast<ObjCObjectType>(Desugared))
-      return ObjCType->getInterface();
-    return nullptr;
-  }
-
   void visitObjCDecl(const ObjCContainerDecl *CD) const {
     if (BR->getSourceManager().isInSystemHeader(CD->getLocation()))
       return;
@@ -169,7 +156,7 @@ class RawPtrRefMemberChecker
 
     if (auto *MemberCXXRD = IvarType->getPointeeCXXRecordDecl())
       reportBug(Ivar, IvarType, MemberCXXRD, CD);
-    else if (auto *ObjCDecl = getObjCDecl(IvarType))
+    else if (auto *ObjCDecl = getObjCDeclFromObjCPtr(IvarType))
       reportBug(Ivar, IvarType, ObjCDecl, CD);
   }
 
@@ -190,7 +177,7 @@ class RawPtrRefMemberChecker
 
     if (auto *MemberCXXRD = PropType->getPointeeCXXRecordDecl())
       reportBug(PD, PropType, MemberCXXRD, CD);
-    else if (auto *ObjCDecl = getObjCDecl(PropType))
+    else if (auto *ObjCDecl = getObjCDeclFromObjCPtr(PropType))
       reportBug(PD, PropType, ObjCDecl, CD);
   }
 
@@ -214,7 +201,7 @@ class RawPtrRefMemberChecker
 
     if (auto *MemberCXXRD = PropType->getPointeeCXXRecordDecl())
       reportBug(PropDecl, PropType, MemberCXXRD, CD);
-    else if (auto *ObjCDecl = getObjCDecl(PropType))
+    else if (auto *ObjCDecl = getObjCDeclFromObjCPtr(PropType))
       reportBug(PropDecl, PropType, ObjCDecl, CD);
   }
 
diff --git a/clang/test/Analysis/Checkers/WebKit/binding-to-refptr.cpp 
b/clang/test/Analysis/Checkers/WebKit/binding-to-refptr.cpp
index 796d56beaf07f..49d922275f2b9 100644
--- a/clang/test/Analysis/Checkers/WebKit/binding-to-refptr.cpp
+++ b/clang/test/Analysis/Checkers/WebKit/binding-to-refptr.cpp
@@ -38,9 +38,9 @@ static void testUnpackedAssignmentWithWeak() {
   auto [a, b] = getStrongWeakPair();
   a->nextSibling();
   b->nextSibling();
-  // expected-warning@-1{{Call argument for 'this' parameter is uncounted and 
unsafe [alpha.webkit.UncountedCallArgsChecker]}}
+  // expected-warning@-1{{Call argument 'b' for 'this' parameter of 
'Node::nextSibling' is a raw pointer to ref-countable type 'Node'}}
   auto [c, d] = getWeakStrongPair();
   c->nextSibling();
-  // expected-warning@-1{{Call argument for 'this' parameter is uncounted and 
unsafe [alpha.webkit.UncountedCallArgsChecker]}}
+  // expected-warning@-1{{Call argument 'c' for 'this' parameter of 
'Node::nextSibling' is a raw pointer to ref-countable type 'Node'}}
   d->nextSibling();
 }
diff --git 
a/clang/test/Analysis/Checkers/WebKit/call-args-checked-const-member.cpp 
b/clang/test/Analysis/Checkers/WebKit/call-args-checked-const-member.cpp
index 7959daf0ceaaf..bc95deede57bb 100644
--- a/clang/test/Analysis/Checkers/WebKit/call-args-checked-const-member.cpp
+++ b/clang/test/Analysis/Checkers/WebKit/call-args-checked-const-member.cpp
@@ -17,7 +17,7 @@ class Foo {
 void Foo::bar() {
   m_obj1->method();
   m_obj2->method();
-  // expected-warning@-1{{Call argument for 'this' parameter is unchecked and 
unsafe}}
+  // expected-warning@-1{{Call argument 'this->m_obj2' for 'this' parameter of 
'CheckedObj::method' is a raw pointer to CheckedPtr capable type 'CheckedObj'}}
 }
 
 } // namespace call_args_const_checkedptr_member
@@ -37,7 +37,7 @@ class Foo {
 void Foo::bar() {
   m_obj1->method();
   m_obj2->method();
-  // expected-warning@-1{{Call argument for 'this' parameter is unchecked and 
unsafe}}
+  // expected-warning@-1{{Call argument 'this->m_obj2' for 'this' parameter of 
'CheckedObj::method' is a raw pointer to CheckedPtr capable type 'CheckedObj'}}
 }
 
 } // namespace call_args_const_checkedref_member
@@ -91,10 +91,10 @@ class Foo {
 void Foo::bar() {
   m_obj1->method();
   m_obj2->method();
-  // expected-warning@-1{{Call argument for 'this' parameter is unchecked and 
unsafe}}
+  // expected-warning@-1{{Call argument 'this->m_obj2' for 'this' parameter of 
'CheckedObj::method' is a raw pointer to CheckedPtr capable type 'CheckedObj'}}
   ensureObj3().method();
   badEnsureObj4().method();
-  // expected-warning@-1{{Call argument for 'this' parameter is unchecked and 
unsafe}}
+  // expected-warning@-1{{Call argument 'this->badEnsureObj4()' for 'this' 
parameter of 'CheckedObj::method' is a raw pointer to CheckedPtr capable type 
'CheckedObj'}}
   ensureObj5()->method();
   ensureObj6()->method();
 }
diff --git a/clang/test/Analysis/Checkers/WebKit/call-args-checked-ptr.cpp 
b/clang/test/Analysis/Checkers/WebKit/call-args-checked-ptr.cpp
index d539891ed832d..935eb3d35d23a 100644
--- a/clang/test/Analysis/Checkers/WebKit/call-args-checked-ptr.cpp
+++ b/clang/test/Analysis/Checkers/WebKit/call-args-checked-ptr.cpp
@@ -9,7 +9,7 @@ void some_function();
 namespace simple {
   void foo() {
     consume_refcntbl(provide());
-    // expected-warning@-1{{Call argument is unchecked and unsafe}}
+    // expected-warning@-1{{Call argument 'provide()' of 'consume_refcntbl' is 
a raw pointer to CheckedPtr capable type 'CheckedObj'}}
   }
 
   // Test that the checker works with [[clang::suppress]].
@@ -23,7 +23,7 @@ namespace multi_arg {
   void consume_refcntbl(int, CheckedObj* foo, bool);
   void foo() {
     consume_refcntbl(42, provide(), true);
-    // expected-warning@-1{{Call argument for parameter 'foo' is unchecked and 
unsafe}}
+    // expected-warning@-1{{Call argument 'provide()' for parameter 'foo' of 
'multi_arg::consume_refcntbl' is a raw pointer to CheckedPtr capable type 
'CheckedObj'}}
   }
 }
 
@@ -47,9 +47,9 @@ namespace methods {
     Consumer c;
 
     c.consume_ptr(provide());
-    // expected-warning@-1{{Call argument for parameter 'ptr' is unchecked and 
unsafe}}
+    // expected-warning@-1{{Call argument 'provide()' for parameter 'ptr' of 
'methods::Consumer::consume_ptr' is a raw pointer to CheckedPtr capable type 
'CheckedObj'}}
     c.consume_ref(*provide());
-    // expected-warning@-1{{Call argument for parameter 'ref' is unchecked and 
unsafe}}
+    // expected-warning@-1{{Call argument '*provide()' for parameter 'ref' of 
'methods::Consumer::consume_ref' is a raw reference to CheckedPtr capable type 
'CheckedObj'}}
   }
 
   void foo2() {
@@ -57,7 +57,7 @@ namespace methods {
       void consume(CheckedObj*) { some_function(); }
       void whatever() {
         consume(provide());
-        // expected-warning@-1{{Call argument is unchecked and unsafe}}
+        // expected-warning@-1{{Call argument 'provide()' of 
'methods::foo2()::Consumer::consume' is a raw pointer to CheckedPtr capable 
type 'CheckedObj'}}
       }
     };
   }
@@ -67,7 +67,7 @@ namespace methods {
       void consume(CheckedObj*) { some_function(); }
       void whatever() {
         this->consume(provide());
-        // expected-warning@-1{{Call argument is unchecked and unsafe}}
+        // expected-warning@-1{{Call argument 'provide()' of 
'methods::foo3()::Consumer::consume' is a raw pointer to CheckedPtr capable 
type 'CheckedObj'}}
       }
     };
   }
@@ -78,22 +78,22 @@ namespace casts {
 
   void foo() {
     consume_refcntbl(provide());
-    // expected-warning@-1{{Call argument is unchecked and unsafe}}
+    // expected-warning@-1{{Call argument 'provide()' of 'consume_refcntbl' is 
a raw pointer to CheckedPtr capable type 'CheckedObj'}}
 
     consume_refcntbl(static_cast<CheckedObj*>(provide()));
-    // expected-warning@-1{{Call argument is unchecked and unsafe}}
+    // expected-warning@-1{{Call argument 'static_cast<CheckedObj 
*>(provide())' of 'consume_refcntbl' is a raw pointer to CheckedPtr capable 
type 'CheckedObj'}}
 
     consume_refcntbl(dynamic_cast<CheckedObj*>(provide()));
-    // expected-warning@-1{{Call argument is unchecked and unsafe}}
+    // expected-warning@-1{{Call argument 'dynamic_cast<CheckedObj 
*>(provide())' of 'consume_refcntbl' is a raw pointer to CheckedPtr capable 
type 'CheckedObj'}}
 
     consume_refcntbl(const_cast<CheckedObj*>(provide()));
-    // expected-warning@-1{{Call argument is unchecked and unsafe}}
+    // expected-warning@-1{{Call argument 'const_cast<CheckedObj 
*>(provide())' of 'consume_refcntbl' is a raw pointer to CheckedPtr capable 
type 'CheckedObj'}}
 
     consume_refcntbl(reinterpret_cast<CheckedObj*>(provide()));
-    // expected-warning@-1{{Call argument is unchecked and unsafe}}
+    // expected-warning@-1{{Call argument 'reinterpret_cast<CheckedObj 
*>(provide())' of 'consume_refcntbl' is a raw pointer to CheckedPtr capable 
type 'CheckedObj'}}
 
     consume_refcntbl(downcast(provide()));
-    // expected-warning@-1{{Call argument is unchecked and unsafe}}
+    // expected-warning@-1{{Call argument 'downcast(provide())' of 
'consume_refcntbl' is a raw pointer to CheckedPtr capable type 'CheckedObj'}}
 
     consume_refcntbl(
       static_cast<CheckedObj*>(
@@ -104,7 +104,7 @@ namespace casts {
         )
       )
     );
-    // expected-warning@-8{{Call argument is unchecked and unsafe}}
+    // expected-warning@-8{{Call argument 'static_cast<CheckedObj 
*>(downcast(static_cast<Che...' of 'consume_refcntbl' is a raw pointer to 
CheckedPtr capable type 'CheckedObj'}}
   }
 }
 
@@ -124,7 +124,7 @@ namespace ref_counted_lookalike {
     Decoy D;
 
     consume_refcntbl(D.get());
-    // expected-warning@-1{{Call argument is unchecked and unsafe}}
+    // expected-warning@-1{{Call argument 'D.get()' of 'consume_refcntbl' is a 
raw pointer to CheckedPtr capable type 'CheckedObj'}}
   }
 }
 
@@ -306,7 +306,7 @@ namespace default_arg {
   CheckedObj* global;
 
   void function_with_default_arg(CheckedObj* param = global);
-  // expected-warning@-1{{Call argument for parameter 'param' is unchecked and 
unsafe}}
+  // expected-warning@-1{{Call argument 'global' for parameter 'param' of 
'default_arg::function_with_default_arg' is a raw pointer to CheckedPtr capable 
type 'CheckedObj'}}
 
   void foo() {
     function_with_default_arg();
@@ -318,7 +318,7 @@ namespace cxx_member_func {
   void foo() {
     provide()->trivial();
     provide()->method();
-    // expected-warning@-1{{Call argument for 'this' parameter is unchecked 
and unsafe}}
+    // expected-warning@-1{{Call argument 'provide()' for 'this' parameter of 
'CheckedObj::method' is a raw pointer to CheckedPtr capable type 'CheckedObj'}}
     provideProtected()->method();
     (provideProtected())->method();
   };
@@ -337,11 +337,11 @@ namespace cxx_member_operator_call {
   void foo() {
     Foo f;
     f + global;
-    // expected-warning@-1{{Call argument for parameter 'bad' is unchecked and 
unsafe}}
+    // expected-warning@-1{{Call argument 'global' for parameter 'bad' of 
'cxx_member_operator_call::Foo::operator+' is a raw pointer to CheckedPtr 
capable type 'CheckedObj'}}
     f - global;
-    // expected-warning@-1{{Call argument for parameter 'bad' is unchecked and 
unsafe}}
+    // expected-warning@-1{{Call argument 'global' for parameter 'bad' of 
'cxx_member_operator_call::operator-' is a raw pointer to CheckedPtr capable 
type 'CheckedObj'}}
     f(global);
-    // expected-warning@-1{{Call argument for parameter 'bad' is unchecked and 
unsafe}}
+    // expected-warning@-1{{Call argument 'global' for parameter 'bad' of 
'cxx_member_operator_call::Foo::operator()' is a raw pointer to CheckedPtr 
capable type 'CheckedObj'}}
   }
 }
 
@@ -353,9 +353,9 @@ namespace call_with_ptr_on_ref {
     bar(v ? nullptr : provideProtected().ptr());
     bar(baz() ? provideProtected().ptr() : nullptr);
     bar(v ? provide() : provideProtected().ptr());
-    // expected-warning@-1{{Call argument for parameter 'bad' is unchecked and 
unsafe}}
+    // expected-warning@-1{{Call argument 'v ? provide() : 
provideProtected().ptr()' for parameter 'bad' of 'call_with_ptr_on_ref::bar' is 
a raw pointer to CheckedPtr capable type 'CheckedObj'}}
     bar(v ? provideProtected().ptr() : provide());
-    // expected-warning@-1{{Call argument for parameter 'bad' is unchecked and 
unsafe}}
+    // expected-warning@-1{{Call argument 'v ? provideProtected().ptr() : 
provide()' for parameter 'bad' of 'call_with_ptr_on_ref::bar' is a raw pointer 
to CheckedPtr capable type 'CheckedObj'}}
   }
 }
 
diff --git a/clang/test/Analysis/Checkers/WebKit/call-args-checked.cpp 
b/clang/test/Analysis/Checkers/WebKit/call-args-checked.cpp
index b257d09236c07..449e85282f5c1 100644
--- a/clang/test/Analysis/Checkers/WebKit/call-args-checked.cpp
+++ b/clang/test/Analysis/Checkers/WebKit/call-args-checked.cpp
@@ -10,7 +10,7 @@ namespace call_args_unchecked_uncounted {
 
 static void foo() {
   someFunction(makeObj());
-  // expected-warning@-1{{Call argument is unchecked and unsafe 
[alpha.webkit.UncheckedCallArgsChecker]}}
+  // expected-warning@-1{{Call argument 'makeObj()' of 'someFunction' is a raw 
pointer to CheckedPtr capable type 'RefCountableAndCheckable'}}
 }
 
 } // namespace call_args_unchecked_uncounted
@@ -42,11 +42,11 @@ struct WrapperObj {
   void foo() {
     consume(checked);
     consume(checkedRef);
-    // expected-warning@-1{{Call argument is unchecked and unsafe 
[alpha.webkit.UncheckedCallArgsChecker]}}
+    // expected-warning@-1{{Call argument 'this->checkedRef' of 
'call_args_member::consume' is a raw reference to CheckedPtr capable type 
'CheckedObj'}}
   }
   void bar(WrapperObj& other) {
     consume(other.checked);
-    // expected-warning@-1{{Call argument is unchecked and unsafe 
[alpha.webkit.UncheckedCallArgsChecker]}}
+    // expected-warning@-1{{Call argument 'other.checked' of 
'call_args_member::consume' is a raw reference to CheckedPtr capable type 
'CheckedObj'}}
   }
 };
 
@@ -55,7 +55,7 @@ struct WrapperObj {
 namespace call_args_default {
 
 void someFunction(RefCountableAndCheckable* = makeObj());
-// expected-warning@-1{{Call argument is unchecked and unsafe 
[alpha.webkit.UncheckedCallArgsChecker]}}
+// expected-warning@-1{{Call argument 'makeObj()' of 
'call_args_default::someFunction' is a raw pointer to CheckedPtr capable type 
'RefCountableAndCheckable'}}
 void otherFunction(RefCountableAndCheckable* = makeObjChecked().ptr());
 
 void foo() {
diff --git 
a/clang/test/Analysis/Checkers/WebKit/call-args-counted-const-member.cpp 
b/clang/test/Analysis/Checkers/WebKit/call-args-counted-const-member.cpp
index 8da415a818a82..7becb8eb962cb 100644
--- a/clang/test/Analysis/Checkers/WebKit/call-args-counted-const-member.cpp
+++ b/clang/test/Analysis/Checkers/WebKit/call-args-counted-const-member.cpp
@@ -20,7 +20,7 @@ class Foo {
 void Foo::bar() {
   m_obj1->method();
   m_obj2->method();
-  // expected-warning@-1{{Call argument for 'this' parameter is uncounted and 
unsafe}}
+  // expected-warning@-1{{Call argument 'this->m_obj2' for 'this' parameter of 
'RefCountable::method' is a raw pointer to ref-countable type 'RefCountable'}}
 }
 
 } // namespace call_args_const_refptr_member
@@ -41,7 +41,7 @@ class Foo {
 void Foo::bar() {
   m_obj1->method();
   m_obj2->method();
-  // expected-warning@-1{{Call argument for 'this' parameter is uncounted and 
unsafe}}
+  // expected-warning@-1{{Call argument 'this->m_obj2' for 'this' parameter of 
'RefCountable::method' is a raw pointer to ref-countable type 'RefCountable'}}
   obj1().method();
 }
 
@@ -87,10 +87,10 @@ class Foo {
 void Foo::bar() {
   m_obj1->method();
   m_obj2->method();
-  // expected-warning@-1{{Call argument for 'this' parameter is uncounted and 
unsafe}}
+  // expected-warning@-1{{Call argument 'this->m_obj2' for 'this' parameter of 
'RefCountable::method' is a raw pointer to ref-countable type 'RefCountable'}}
   ensureObj3().method();
   badEnsureObj4().method();
-  // expected-warning@-1{{Call argument for 'this' parameter is uncounted and 
unsafe}}
+  // expected-warning@-1{{Call argument 'this->badEnsureObj4()' for 'this' 
parameter of 'RefCountable::method' is a raw pointer to ref-countable type 
'RefCountable'}}
   ensureObj5()->method();
 }
 
@@ -112,7 +112,7 @@ class Foo {
 void Foo::bar() {
   m_obj1->method();
   m_obj2->method();
-  // expected-warning@-1{{Call argument for 'this' parameter is uncounted and 
unsafe}}
+  // expected-warning@-1{{Call argument 'this->m_obj2' for 'this' parameter of 
'RefCountable::method' is a raw pointer to ref-countable type 'RefCountable'}}
   obj1().method();
 }
 
diff --git 
a/clang/test/Analysis/Checkers/WebKit/call-args-loop-init-opaque-value.cpp 
b/clang/test/Analysis/Checkers/WebKit/call-args-loop-init-opaque-value.cpp
index 8fa10306c20f3..a57330ff8274d 100644
--- a/clang/test/Analysis/Checkers/WebKit/call-args-loop-init-opaque-value.cpp
+++ b/clang/test/Analysis/Checkers/WebKit/call-args-loop-init-opaque-value.cpp
@@ -60,5 +60,5 @@ bool someFunction(Component* other) {
 
 bool otherFunction(Component* other) {
     return provide()->isNonTrivialEqual(*other);
-    // expected-warning@-1{{Call argument for 'this' parameter is uncounted 
and unsafe}}
+    // expected-warning@-1{{Call argument 'provide()' for 'this' parameter of 
'Component::isNonTrivialEqual' is a raw pointer to ref-countable type 
'Component'}}
 }
diff --git a/clang/test/Analysis/Checkers/WebKit/call-args-safe-functions.cpp 
b/clang/test/Analysis/Checkers/WebKit/call-args-safe-functions.cpp
index 5c540a58debaf..b5168cf0d3ec7 100644
--- a/clang/test/Analysis/Checkers/WebKit/call-args-safe-functions.cpp
+++ b/clang/test/Analysis/Checkers/WebKit/call-args-safe-functions.cpp
@@ -63,7 +63,7 @@ void foo(OtherObject* other)
     uncheckedDowncast<SubDerived>(other->obj());
     newCastFunction<SubDerived>(other->obj());
     badCastFunction<SubDerived>(other->obj());
-    // expected-warning@-1{{Call argument is uncounted and unsafe}}
+    // expected-warning@-1{{Call argument 'other->obj()' of 
'badCastFunction<SubDerived, Derived>' is a raw pointer to ref-countable type 
'Derived'}}
     toString(other->obj());
 }
 
diff --git a/clang/test/Analysis/Checkers/WebKit/call-args-wtf-containers.cpp 
b/clang/test/Analysis/Checkers/WebKit/call-args-wtf-containers.cpp
index 17e25d9a62703..fb006aec22e7c 100644
--- a/clang/test/Analysis/Checkers/WebKit/call-args-wtf-containers.cpp
+++ b/clang/test/Analysis/Checkers/WebKit/call-args-wtf-containers.cpp
@@ -225,26 +225,26 @@ void test() {
   set.find(*object());
   set.contains(*object());
   set.add(*object());
-  // expected-warning@-1{{Call argument is uncounted and unsafe}}
+  // expected-warning@-1{{Call argument '*object()' of 
'WTF::HashSet<RefPtr<RefCounted>>::add<RefCounted>' is a raw reference to 
ref-countable type 'RefCounted'}}
   set.remove(*object());
-  // expected-warning@-1{{Call argument is uncounted and unsafe}}
+  // expected-warning@-1{{Call argument '*object()' of 
'WTF::HashSet<RefPtr<RefCounted>>::remove<RefCounted>' is a raw reference to 
ref-countable type 'RefCounted'}}
 
   HashMap<Ref<RefCounted>, unsigned> map;
   map.find(*object());
   map.contains(*object());
   map.inlineGet(*object());
   map.add(*object());
-  // expected-warning@-1{{Call argument is uncounted and unsafe}}
+  // expected-warning@-1{{Call argument '*object()' of 
'WTF::HashMap<Ref<RefCounted>, unsigned int>::add<RefCounted>' is a raw 
reference to ref-countable type 'RefCounted'}}
   map.remove(*object());
-  // expected-warning@-1{{Call argument is uncounted and unsafe}}
+  // expected-warning@-1{{Call argument '*object()' of 
'WTF::HashMap<Ref<RefCounted>, unsigned int>::remove<RefCounted>' is a raw 
reference to ref-countable type 'RefCounted'}}
 
   WeakHashSet<Ref<RefCounted>> weakSet;
   weakSet.find(*object());
   weakSet.contains(*object());
   weakSet.add(*object());
-  // expected-warning@-1{{Call argument is uncounted and unsafe}}
+  // expected-warning@-1{{Call argument '*object()' of 
'WTF::WeakHashSet<Ref<RefCounted>>::add<RefCounted>' is a raw reference to 
ref-countable type 'RefCounted'}}
   weakSet.remove(*object());
-  // expected-warning@-1{{Call argument is uncounted and unsafe}}
+  // expected-warning@-1{{Call argument '*object()' of 
'WTF::WeakHashSet<Ref<RefCounted>>::remove<RefCounted>' is a raw reference to 
ref-countable type 'RefCounted'}}
 
   Vector<Ref<RefCounted>> vector;
   vector.at(0);
@@ -253,9 +253,9 @@ void test() {
   vector.reverseFind(*object());
   vector.contains(*object());
   vector.append(*object());
-  // expected-warning@-1{{Call argument is uncounted and unsafe}}
+  // expected-warning@-1{{Call argument '*object()' of 
'WTF::Vector<Ref<RefCounted>>::append<RefCounted>' is a raw reference to 
ref-countable type 'RefCounted'}}
   vector.remove(*object());
-  // expected-warning@-1{{Call argument is uncounted and unsafe}}
+  // expected-warning@-1{{Call argument '*object()' of 
'WTF::Vector<Ref<RefCounted>>::remove<RefCounted>' is a raw reference to 
ref-countable type 'RefCounted'}}
 
   auto* obj = object();
   vector.findIf([&](Ref<RefCounted> key) { return key.ptr() == obj; });
diff --git a/clang/test/Analysis/Checkers/WebKit/call-args.cpp 
b/clang/test/Analysis/Checkers/WebKit/call-args.cpp
index a9bcacebc007a..b0a232fb61a6b 100644
--- a/clang/test/Analysis/Checkers/WebKit/call-args.cpp
+++ b/clang/test/Analysis/Checkers/WebKit/call-args.cpp
@@ -9,7 +9,7 @@ void some_function();
 namespace simple {
   void foo() {
     consume_refcntbl(provide());
-    // expected-warning@-1{{Call argument is uncounted and unsafe}}
+    // expected-warning@-1{{Call argument 'provide()' of 'consume_refcntbl' is 
a raw pointer to ref-countable type 'RefCountable'}}
   }
 
   // Test that the checker works with [[clang::suppress]].
@@ -23,7 +23,7 @@ namespace multi_arg {
   void consume_refcntbl(int, RefCountable* foo, bool);
   void foo() {
     consume_refcntbl(42, provide(), true);
-    // expected-warning@-1{{Call argument for parameter 'foo' is uncounted and 
unsafe}}
+    // expected-warning@-1{{Call argument 'provide()' for parameter 'foo' of 
'multi_arg::consume_refcntbl' is a raw pointer to ref-countable type 
'RefCountable'}}
   }
 }
 
@@ -47,9 +47,9 @@ namespace methods {
     Consumer c;
 
     c.consume_ptr(provide());
-    // expected-warning@-1{{Call argument for parameter 'ptr' is uncounted and 
unsafe}}
+    // expected-warning@-1{{Call argument 'provide()' for parameter 'ptr' of 
'methods::Consumer::consume_ptr' is a raw pointer to ref-countable type 
'RefCountable'}}
     c.consume_ref(*provide());
-    // expected-warning@-1{{Call argument for parameter 'ref' is uncounted and 
unsafe}}
+    // expected-warning@-1{{Call argument '*provide()' for parameter 'ref' of 
'methods::Consumer::consume_ref' is a raw reference to ref-countable type}}
   }
 
   void foo2() {
@@ -57,7 +57,7 @@ namespace methods {
       void consume(RefCountable*) { some_function(); }
       void whatever() {
         consume(provide());
-        // expected-warning@-1{{Call argument is uncounted and unsafe}}
+        // expected-warning@-1{{Call argument 'provide()' of 
'methods::foo2()::Consumer::consume' is a raw pointer to ref-countable type 
'RefCountable'}}
       }
     };
   }
@@ -67,7 +67,7 @@ namespace methods {
       void consume(RefCountable*) { some_function(); }
       void whatever() {
         this->consume(provide());
-        // expected-warning@-1{{Call argument is uncounted and unsafe}}
+        // expected-warning@-1{{Call argument 'provide()' of 
'methods::foo3()::Consumer::consume' is a raw pointer to ref-countable type 
'RefCountable'}}
       }
     };
   }
@@ -78,22 +78,22 @@ namespace casts {
 
   void foo() {
     consume_refcntbl(provide());
-    // expected-warning@-1{{Call argument is uncounted and unsafe}}
+    // expected-warning@-1{{Call argument 'provide()' of 'consume_refcntbl' is 
a raw pointer to ref-countable type 'RefCountable'}}
 
     consume_refcntbl(static_cast<RefCountable*>(provide()));
-    // expected-warning@-1{{Call argument is uncounted and unsafe}}
+    // expected-warning@-1{{Call argument 'static_cast<RefCountable 
*>(provide())' of 'consume_refcntbl' is a raw pointer to ref-countable type 
'RefCountable'}}
 
     consume_refcntbl(dynamic_cast<RefCountable*>(provide()));
-    // expected-warning@-1{{Call argument is uncounted and unsafe}}
+    // expected-warning@-1{{Call argument 'dynamic_cast<RefCountable 
*>(provide())' of 'consume_refcntbl' is a raw pointer to ref-countable type 
'RefCountable'}}
 
     consume_refcntbl(const_cast<RefCountable*>(provide()));
-    // expected-warning@-1{{Call argument is uncounted and unsafe}}
+    // expected-warning@-1{{Call argument 'const_cast<RefCountable 
*>(provide())' of 'consume_refcntbl' is a raw pointer to ref-countable type 
'RefCountable'}}
 
     consume_refcntbl(reinterpret_cast<RefCountable*>(provide()));
-    // expected-warning@-1{{Call argument is uncounted and unsafe}}
+    // expected-warning@-1{{Call argument 'reinterpret_cast<RefCountable 
*>(provide())' of 'consume_refcntbl' is a raw pointer to ref-countable type 
'RefCountable'}}
 
     consume_refcntbl(downcast(provide()));
-    // expected-warning@-1{{Call argument is uncounted and unsafe}}
+    // expected-warning@-1{{Call argument 'downcast(provide())' of 
'consume_refcntbl' is a raw pointer to ref-countable type 'RefCountable'}}
 
     consume_refcntbl(
       static_cast<RefCountable*>(
@@ -104,7 +104,7 @@ namespace casts {
         )
       )
     );
-    // expected-warning@-8{{Call argument is uncounted and unsafe}}
+    // expected-warning@-8{{Call argument 'static_cast<RefCountable 
*>(downcast(static_cast<R...' of 'consume_refcntbl' is a raw pointer to 
ref-countable type 'RefCountable'}}
   }
 }
 
@@ -124,7 +124,7 @@ namespace ref_counted_lookalike {
     Decoy D;
 
     consume_refcntbl(D.get());
-    // expected-warning@-1{{Call argument is uncounted and unsafe}}
+    // expected-warning@-1{{Call argument 'D.get()' of 'consume_refcntbl' is a 
raw pointer to ref-countable type 'RefCountable'}}
   }
 }
 
@@ -306,7 +306,7 @@ namespace default_arg {
   RefCountable* global;
 
   void function_with_default_arg(RefCountable* param = global);
-  // expected-warning@-1{{Call argument for parameter 'param' is uncounted and 
unsafe}}
+  // expected-warning@-1{{Call argument 'global' for parameter 'param' of 
'default_arg::function_with_default_arg' is a raw pointer to ref-countable type 
'RefCountable'}}
 
   void foo() {
     function_with_default_arg();
@@ -318,7 +318,7 @@ namespace cxx_member_func {
   void foo() {
     provide()->trivial();
     provide()->method();
-    // expected-warning@-1{{Call argument for 'this' parameter is uncounted 
and unsafe}}
+    // expected-warning@-1{{Call argument 'provide()' for 'this' parameter of 
'RefCountable::method' is a raw pointer to ref-countable type 'RefCountable'}}
     provideProtected()->method();
     (provideProtected())->method();
   };
@@ -347,13 +347,13 @@ namespace cxx_member_operator_call {
   void foo12() {
     Foo f;
     f + global;
-    // expected-warning@-1{{Call argument for parameter 'bad' is uncounted and 
unsafe}}
+    // expected-warning@-1{{Call argument 'global' for parameter 'bad' of 
'cxx_member_operator_call::Foo::operator+' is a raw pointer to ref-countable 
type 'RefCountable'}}
     f - global;
-    // expected-warning@-1{{Call argument for parameter 'bad' is uncounted and 
unsafe}}
+    // expected-warning@-1{{Call argument 'global' for parameter 'bad' of 
'cxx_member_operator_call::operator-' is a raw pointer to ref-countable type 
'RefCountable'}}
     f(global);
-    // expected-warning@-1{{Call argument for parameter 'bad' is uncounted and 
unsafe}}
+    // expected-warning@-1{{Call argument 'global' for parameter 'bad' of 
'cxx_member_operator_call::Foo::operator()' is a raw pointer to ref-countable 
type 'RefCountable'}}
     container()[0] = 3;
-    // expected-warning@-1{{Call argument for 'this' parameter is uncounted 
and unsafe}}
+    // expected-warning@-1{{Call argument 'container()' for 'this' parameter 
of 'cxx_member_operator_call::Container::operator[]' is a raw pointer to 
ref-countable type 'cxx_member_operator_call::Container'}}
   }
 }
 
@@ -367,11 +367,11 @@ namespace call_function_ptr {
 
   void foo(void (*consume)(void*, RefCountableWithWeakPtr*), void 
(*consumeVar)(RefCountableWithWeakPtr*, ...), void 
(RefCountableWithWeakPtr::*method)()) {
     consume(nullptr, provide());
-    // expected-warning@-1{{Call argument is uncounted and unsafe}}
+    // expected-warning@-1{{Call argument 'provide()' is a raw pointer to 
ref-countable type 'call_function_ptr::RefCountableWithWeakPtr}}
     consumeVar(nullptr, provide());
-    // expected-warning@-1{{Call argument is uncounted and unsafe}}
+    // expected-warning@-1{{Call argument 'provide()' is a raw pointer to 
ref-countable type 'call_function_ptr::RefCountableWithWeakPtr}}
     (provide()->*method)();
-    // expected-warning@-1{{Call argument for 'this' parameter is uncounted 
and unsafe}}
+    // expected-warning@-1{{Call argument 'provide()' for 'this' parameter is 
a raw pointer to ref-countable type 
'call_function_ptr::RefCountableWithWeakPtr'}}
   }
 
   template <typename T, typename U, typename... Arg>
@@ -388,9 +388,9 @@ namespace call_with_ptr_on_ref {
     bar(v ? nullptr : provideProtected().ptr());
     bar(baz() ? provideProtected().ptr() : nullptr);
     bar(v ? provide() : provideProtected().ptr());
-    // expected-warning@-1{{Call argument for parameter 'bad' is uncounted and 
unsafe}}
+    // expected-warning@-1{{Call argument 'v ? provide() : 
provideProtected().ptr()' for parameter 'bad' of 'call_with_ptr_on_ref::bar' is 
a raw pointer to ref-countable type 'RefCountable'}}
     bar(v ? provideProtected().ptr() : provide());
-    // expected-warning@-1{{Call argument for parameter 'bad' is uncounted and 
unsafe}}
+    // expected-warning@-1{{Call argument 'v ? provideProtected().ptr() : 
provide()' for parameter 'bad' of 'call_with_ptr_on_ref::bar' is a raw pointer 
to ref-countable type 'RefCountable'}}
   }
 }
 
@@ -459,7 +459,7 @@ namespace call_with_explicit_construct {
   class Obj {
   public:
     Obj(RefCountable* obj = provide(), RefCountable* otherObj = nullptr) {
-      // expected-warning@-1{{Call argument for parameter 'obj' is uncounted 
and unsafe}}
+      // expected-warning@-1{{Call argument 'provide()' for parameter 'obj' of 
'call_with_explicit_construct::Obj::Obj' is a raw pointer to ref-countable type 
'RefCountable'}}
       consume_refcntbl(obj);
       if (otherObj)
         otherObj->method();
@@ -472,13 +472,13 @@ namespace call_with_explicit_construct {
   void foo(RefCountable* arg) {
     Obj obj1;
     Obj obj2(provide());
-    // expected-warning@-1{{Call argument for parameter 'obj' is uncounted and 
unsafe}}
+    // expected-warning@-1{{Call argument 'provide()' for parameter 'obj' of 
'call_with_explicit_construct::Obj::Obj' is a raw pointer to ref-countable type 
'RefCountable'}}
     Obj obj3(*provide());
-    // expected-warning@-1{{Call argument for parameter 'obj' is uncounted and 
unsafe}}
+    // expected-warning@-1{{Call argument '*provide()' for parameter 'obj' of 
'call_with_explicit_construct::Obj::Obj' is a raw reference to ref-countable 
type 'RefCountable'}}
     Obj obj4(Ref<RefCountable> { *provide() }.get());
     Obj obj5(arg);
     Obj obj6(arg, provide());
-    // expected-warning@-1{{Call argument for parameter 'otherObj' is 
uncounted and unsafe}}
+    // expected-warning@-1{{Call argument 'provide()' for parameter 'otherObj' 
of 'call_with_explicit_construct::Obj::Obj' is a raw pointer to ref-countable 
type 'RefCountable'}}
   }
 }
 
@@ -511,9 +511,9 @@ namespace call_on_member {
 
     void doWork() {
       m_obj->method();
-      // expected-warning@-1{{Call argument for 'this' parameter is uncounted 
and unsafe}}
+      // expected-warning@-1{{Call argument 'this->m_obj' for 'this' parameter 
of 'RefCountable::method' is a raw pointer to ref-countable type 
'RefCountable'}}
       m_obj.get()->method();
-      // expected-warning@-1{{Call argument for 'this' parameter is uncounted 
and unsafe}}
+      // expected-warning@-1{{Call argument 'this->m_obj.get()' for 'this' 
parameter of 'RefCountable::method' is a raw pointer to ref-countable type 
'RefCountable'}}
       m_constObj->method();
     }
 
@@ -546,7 +546,7 @@ namespace call_on_member {
 
   void foo() {
     provide()->constObj().method();
-    // expected-warning@-1{{Call argument for 'this' parameter is uncounted 
and unsafe}}
+    // expected-warning@-1{{Call argument 'provide()->constObj()' for 'this' 
parameter of 'RefCountable::method' is a raw pointer to ref-countable type 
'RefCountable'}}
     Ref { provide()->constObj() }->method();
     RefPtr { provide() }->constObj().method();
   }
@@ -564,9 +564,9 @@ namespace call_with_weak_ptr {
   void foo() {
     WeakPtr weakPtr = provide();
     consume(weakPtr);
-    // expected-warning@-1{{Call argument is uncounted and unsafe}}
+    // expected-warning@-1{{Call argument 'weakPtr' of 
'call_with_weak_ptr::consume' is a raw pointer to ref-countable type 
'call_with_weak_ptr::RefCountableWithWeakPtr'}}
     weakPtr->method();
-    // expected-warning@-1{{Call argument for 'this' parameter is uncounted 
and unsafe}}
+    // expected-warning@-1{{Call argument 'weakPtr' for 'this' parameter of 
'RefCountable::method' is a raw pointer to ref-countable type 'RefCountable'}}
   }
 
   struct Provider {
diff --git 
a/clang/test/Analysis/Checkers/WebKit/ref-countable-default-arg-nullptr.cpp 
b/clang/test/Analysis/Checkers/WebKit/ref-countable-default-arg-nullptr.cpp
index a1860a5434c86..e9a6993cf764f 100644
--- a/clang/test/Analysis/Checkers/WebKit/ref-countable-default-arg-nullptr.cpp
+++ b/clang/test/Analysis/Checkers/WebKit/ref-countable-default-arg-nullptr.cpp
@@ -12,13 +12,13 @@ class Obj {
 
 void someFunction(Obj*, Obj* = nullptr);
 void otherFunction(Obj*, Obj* = Obj::get());
-// expected-warning@-1{{Call argument is uncounted and unsafe 
[alpha.webkit.UncountedCallArgsChecker]}}
+// expected-warning@-1{{Call argument 'Obj::get()' of 'otherFunction' is a raw 
pointer to ref-countable type 'Obj'}}
 void anotherFunction(Obj*, Obj* = Obj::create().get());
 
 void otherFunction() {
   someFunction(nullptr);
   someFunction(Obj::get());
-  // expected-warning@-1{{Call argument is uncounted and unsafe 
[alpha.webkit.UncountedCallArgsChecker]}}
+  // expected-warning@-1{{Call argument 'Obj::get()' of 'someFunction' is a 
raw pointer to ref-countable type 'Obj'}}
   someFunction(Obj::create().get());
   otherFunction(nullptr);
   anotherFunction(nullptr);
diff --git a/clang/test/Analysis/Checkers/WebKit/unchecked-call-arg.cpp 
b/clang/test/Analysis/Checkers/WebKit/unchecked-call-arg.cpp
index b89a3246606ed..a06615f6d8f7e 100644
--- a/clang/test/Analysis/Checkers/WebKit/unchecked-call-arg.cpp
+++ b/clang/test/Analysis/Checkers/WebKit/unchecked-call-arg.cpp
@@ -30,7 +30,7 @@ class CheckedObject : public CanMakeCheckedPtr<CheckedObject, 
Tag::Value> {
 CheckedObject* provide();
 void foo() {
   provide()->doWork();
-  // expected-warning@-1{{Call argument for 'this' parameter is unchecked and 
unsafe}}
+  // expected-warning@-1{{Call argument 'provide()' for 'this' parameter of 
'CheckedObject::doWork' is a raw pointer to CheckedPtr capable type 
'CheckedObject'}}
 }
 
 void doWorkWithObject(const CheckedObject&);
diff --git a/clang/test/Analysis/Checkers/WebKit/uncounted-obj-arg.cpp 
b/clang/test/Analysis/Checkers/WebKit/uncounted-obj-arg.cpp
index 4c26ab225334d..f03206b2c85d3 100644
--- a/clang/test/Analysis/Checkers/WebKit/uncounted-obj-arg.cpp
+++ b/clang/test/Analysis/Checkers/WebKit/uncounted-obj-arg.cpp
@@ -480,19 +480,19 @@ class RefCounted {
 
   int nonTrivial13() { return ~otherFunction(); }
   int nonTrivial14() { int r = 0xff; r |= otherFunction(); return r; }
-  void nonTrivial15() { ++complex; } // expected-warning{{Call argument for 
'this' parameter is uncounted and unsafe}}
-  void nonTrivial16() { complex++; } // expected-warning{{Call argument for 
'this' parameter is uncounted and unsafe}}
+  void nonTrivial15() { ++complex; } // expected-warning{{Call argument 
'this->complex' for 'this' parameter of 'ComplexNumber::operator++' is a raw 
pointer to ref-countable type 'ComplexNumber'}}
+  void nonTrivial16() { complex++; } // expected-warning{{Call argument 
'this->complex' for 'this' parameter of 'ComplexNumber::operator++' is a raw 
pointer to ref-countable type 'ComplexNumber'}}
   ComplexNumber nonTrivial17() {
-    return complex << 2; // expected-warning{{Call argument for 'this' 
parameter is uncounted and unsafe}}
-    // expected-warning@-1{{Call argument is uncounted and unsafe}}
+    return complex << 2; // expected-warning{{Call argument 'this->complex' 
for 'this' parameter of 'ComplexNumber::operator<<' is a raw pointer to 
ref-countable type 'ComplexNumber'}}
+    // expected-warning@-1{{Call argument 'this->complex << 2' of 
'ComplexNumber::ComplexNumber' is a raw reference to ref-countable type 
'ComplexNumber'}}
   }
   ComplexNumber nonTrivial18() {
-    return +complex; // expected-warning{{Call argument for 'this' parameter 
is uncounted and unsafe}}
-    // expected-warning@-1{{Call argument is uncounted and unsafe}}
+    return +complex; // expected-warning{{Call argument 'this->complex' for 
'this' parameter of 'ComplexNumber::operator+' is a raw pointer to 
ref-countable type 'ComplexNumber'}}
+    // expected-warning@-1{{Call argument '+ this->complex' of 
'ComplexNumber::ComplexNumber' is a raw reference to ref-countable type 
'ComplexNumber'}}
   }
   ComplexNumber* nonTrivial19() {
     return new ComplexNumber(complex);
-    // expected-warning@-1{{Call argument is uncounted and unsafe}}
+    // expected-warning@-1{{Call argument 'this->complex' of 
'ComplexNumber::ComplexNumber' is a raw reference to ref-countable type 
'ComplexNumber'}}
   }
   unsigned nonTrivial20() { return ObjectWithMutatingDestructor { 7 }.value(); 
}
   unsigned nonTrivial21() { return Number("123").value(); }
@@ -518,7 +518,7 @@ RefCounted* refCountedObj();
 void test()
 {
   refCountedObj()->someFunction();
-  // expected-warning@-1{{Call argument for 'this' parameter is uncounted and 
unsafe}}
+  // expected-warning@-1{{Call argument 'refCountedObj()' for 'this' parameter 
of 'RefCounted::someFunction' is a raw pointer to ref-countable type 
'RefCounted'}}
 }
 
 class UnrelatedClass {
@@ -616,80 +616,81 @@ class UnrelatedClass {
 
     getFieldTrivial().recursiveTrivialFunction(7); // no-warning
     getFieldTrivial().recursiveComplexFunction(9);
-    // expected-warning@-1{{Call argument for 'this' parameter is uncounted 
and unsafe}}
+    // expected-warning@-1{{Call argument 'this->getFieldTrivial()' for 'this' 
parameter of 'RefCounted::recursiveComplexFunction' is a raw pointer to 
ref-countable type 'RefCounted'}}
     getFieldTrivial().mutuallyRecursiveFunction1(11); // no-warning
     getFieldTrivial().mutuallyRecursiveFunction2(13); // no-warning
     getFieldTrivial().mutuallyRecursiveFunction3(17);
-    // expected-warning@-1{{Call argument for 'this' parameter is uncounted 
and unsafe}}
+    // expected-warning@-1{{Call argument 'this->getFieldTrivial()' for 'this' 
parameter of 'RefCounted::mutuallyRecursiveFunction3' is a raw pointer to 
ref-countable type 'RefCounted'}}
     getFieldTrivial().mutuallyRecursiveFunction4(19);
-    // expected-warning@-1{{Call argument for 'this' parameter is uncounted 
and unsafe}}
+    // expected-warning@-1{{Call argument 'this->getFieldTrivial()' for 'this' 
parameter of 'RefCounted::mutuallyRecursiveFunction4' is a raw pointer to 
ref-countable type 'RefCounted'}}
     getFieldTrivial().recursiveFunction5(23); // no-warning
     getFieldTrivial().recursiveFunction6(29); // no-warning
     getFieldTrivial().recursiveFunction7(31); // no-warning
 
     getFieldTrivial().mutuallyRecursive8();
-    // expected-warning@-1{{Call argument for 'this' parameter is uncounted 
and unsafe}}
+    // expected-warning@-1{{Call argument 'this->getFieldTrivial()' for 'this' 
parameter of 'RefCounted::mutuallyRecursive8' is a raw pointer to ref-countable 
type 'RefCounted'}}
     getFieldTrivial().mutuallyRecursive9();
-    // expected-warning@-1{{Call argument for 'this' parameter is uncounted 
and unsafe}}
+    // expected-warning@-1{{Call argument 'this->getFieldTrivial()' for 'this' 
parameter of 'RefCounted::mutuallyRecursive9' is a raw pointer to ref-countable 
type 'RefCounted'}}
 
     getFieldTrivial().recursiveCost(); // no-warning
 
     getFieldTrivial().someFunction();
-    // expected-warning@-1{{Call argument for 'this' parameter is uncounted 
and unsafe}}
+    // expected-warning@-1{{Call argument 'this->getFieldTrivial()' for 'this' 
parameter of 'RefCounted::someFunction' is a raw pointer to ref-countable type 
'RefCounted'}}
     getFieldTrivial().nonTrivial1();
-    // expected-warning@-1{{Call argument for 'this' parameter is uncounted 
and unsafe}}
+    // expected-warning@-1{{Call argument 'this->getFieldTrivial()' for 'this' 
parameter of 'RefCounted::nonTrivial1' is a raw pointer to ref-countable type 
'RefCounted'}}
     getFieldTrivial().nonTrivial2();
-    // expected-warning@-1{{Call argument for 'this' parameter is uncounted 
and unsafe}}
+    // expected-warning@-1{{Call argument 'this->getFieldTrivial()' for 'this' 
parameter of 'RefCounted::nonTrivial2' is a raw pointer to ref-countable type 
'RefCounted'}}
     getFieldTrivial().nonTrivial3();
-    // expected-warning@-1{{Call argument for 'this' parameter is uncounted 
and unsafe}}
+    // expected-warning@-1{{Call argument 'this->getFieldTrivial()' for 'this' 
parameter of 'RefCounted::nonTrivial3' is a raw pointer to ref-countable type 
'RefCounted'}}
     getFieldTrivial().nonTrivial4();
-    // expected-warning@-1{{Call argument for 'this' parameter is uncounted 
and unsafe}}
+    // expected-warning@-1{{Call argument 'this->getFieldTrivial()' for 'this' 
parameter of 'RefCounted::nonTrivial4' is a raw pointer to ref-countable type 
'RefCounted'}}
     getFieldTrivial().nonTrivial5();
-    // expected-warning@-1{{Call argument for 'this' parameter is uncounted 
and unsafe}}
+    // expected-warning@-1{{Call argument 'this->getFieldTrivial()' for 'this' 
parameter of 'RefCounted::nonTrivial5' is a raw pointer to ref-countable type 
'RefCounted'}}
     getFieldTrivial().nonTrivial6();
-    // expected-warning@-1{{Call argument for 'this' parameter is uncounted 
and unsafe}}
+    // expected-warning@-1{{Call argument 'this->getFieldTrivial()' for 'this' 
parameter of 'RefCounted::nonTrivial6' is a raw pointer to ref-countable type 
'RefCounted'}}
     getFieldTrivial().nonTrivial7();
-    // expected-warning@-1{{Call argument for 'this' parameter is uncounted 
and unsafe}}
+    // expected-warning@-1{{Call argument 'this->getFieldTrivial()' for 'this' 
parameter of 'RefCounted::nonTrivial7' is a raw pointer to ref-countable type 
'RefCounted'}}
     getFieldTrivial().nonTrivial8();
-    // expected-warning@-1{{Call argument for 'this' parameter is uncounted 
and unsafe}}
+    // expected-warning@-1{{Call argument 'this->getFieldTrivial()' for 'this' 
parameter of 'RefCounted::nonTrivial8' is a raw pointer to ref-countable type 
'RefCounted'}}
     getFieldTrivial().nonTrivial9();
-    // expected-warning@-1{{Call argument for 'this' parameter is uncounted 
and unsafe}}
+    // expected-warning@-1{{Call argument 'this->getFieldTrivial()' for 'this' 
parameter of 'RefCounted::nonTrivial9' is a raw pointer to ref-countable type 
'RefCounted'}}
     getFieldTrivial().nonTrivial10();
-    // expected-warning@-1{{Call argument for 'this' parameter is uncounted 
and unsafe}}
+    // expected-warning@-1{{Call argument 'this->getFieldTrivial()' for 'this' 
parameter of 'RefCounted::nonTrivial10' is a raw pointer to ref-countable type 
'RefCounted'}}
     getFieldTrivial().nonTrivial11();
-    // expected-warning@-1{{Call argument for 'this' parameter is uncounted 
and unsafe}}
+    // expected-warning@-1{{Call argument 'this->getFieldTrivial()' for 'this' 
parameter of 'RefCounted::nonTrivial11' is a raw pointer to ref-countable type 
'RefCounted'}}
     getFieldTrivial().nonTrivial12();
-    // expected-warning@-1{{Call argument for 'this' parameter is uncounted 
and unsafe}}
+    // expected-warning@-1{{Call argument 'this->getFieldTrivial()' for 'this' 
parameter of 'RefCounted::nonTrivial12' is a raw pointer to ref-countable type 
'RefCounted'}}
     getFieldTrivial().nonTrivial13();
-    // expected-warning@-1{{Call argument for 'this' parameter is uncounted 
and unsafe}}
+    // expected-warning@-1{{Call argument 'this->getFieldTrivial()' for 'this' 
parameter of 'RefCounted::nonTrivial13' is a raw pointer to ref-countable type 
'RefCounted'}}
     getFieldTrivial().nonTrivial14();
-    // expected-warning@-1{{Call argument for 'this' parameter is uncounted 
and unsafe}}
+    // expected-warning@-1{{Call argument 'this->getFieldTrivial()' for 'this' 
parameter of 'RefCounted::nonTrivial14' is a raw pointer to ref-countable type 
'RefCounted'}}
     getFieldTrivial().nonTrivial15();
-    // expected-warning@-1{{Call argument for 'this' parameter is uncounted 
and unsafe}}
+    // expected-warning@-1{{Call argument 'this->getFieldTrivial()' for 'this' 
parameter of 'RefCounted::nonTrivial15' is a raw pointer to ref-countable type 
'RefCounted'}}
     getFieldTrivial().nonTrivial16();
-    // expected-warning@-1{{Call argument for 'this' parameter is uncounted 
and unsafe}}
+    // expected-warning@-1{{Call argument 'this->getFieldTrivial()' for 'this' 
parameter of 'RefCounted::nonTrivial16' is a raw pointer to ref-countable type 
'RefCounted'}}
     getFieldTrivial().nonTrivial17();
-    // expected-warning@-1{{Call argument for 'this' parameter is uncounted 
and unsafe}}
+    // expected-warning@-1{{Call argument 'this->getFieldTrivial()' for 'this' 
parameter of 'RefCounted::nonTrivial17' is a raw pointer to ref-countable type 
'RefCounted'}}
     getFieldTrivial().nonTrivial18();
-    // expected-warning@-1{{Call argument for 'this' parameter is uncounted 
and unsafe}}
+    // expected-warning@-1{{Call argument 'this->getFieldTrivial()' for 'this' 
parameter of 'RefCounted::nonTrivial18' is a raw pointer to ref-countable type 
'RefCounted'}}
     getFieldTrivial().nonTrivial19();
-    // expected-warning@-1{{Call argument for 'this' parameter is uncounted 
and unsafe}}
+    // expected-warning@-1{{Call argument 'this->getFieldTrivial()' for 'this' 
parameter of 'RefCounted::nonTrivial19' is a raw pointer to ref-countable type 
'RefCounted'}}
     getFieldTrivial().nonTrivial20();
-    // expected-warning@-1{{Call argument for 'this' parameter is uncounted 
and unsafe}}
+    // expected-warning@-1{{Call argument 'this->getFieldTrivial()' for 'this' 
parameter of 'RefCounted::nonTrivial20' is a raw pointer to ref-countable type 
'RefCounted'}}
     getFieldTrivial().nonTrivial21();
-    // expected-warning@-1{{Call argument for 'this' parameter is uncounted 
and unsafe}}
+    // expected-warning@-1{{Call argument 'this->getFieldTrivial()' for 'this' 
parameter of 'RefCounted::nonTrivial21' is a raw pointer to ref-countable type 
'RefCounted'}}
     getFieldTrivial().nonTrivial22();
-    // expected-warning@-1{{Call argument for 'this' parameter is uncounted 
and unsafe}}
+    // expected-warning@-1{{Call argument 'this->getFieldTrivial()' for 'this' 
parameter of 'RefCounted::nonTrivial22' is a raw pointer to ref-countable type 
'RefCounted'}}
     getFieldTrivial().nonTrivial23();
-    // expected-warning@-1{{Call argument for 'this' parameter is uncounted 
and unsafe}}
+    // expected-warning@-1{{Call argument 'this->getFieldTrivial()' for 'this' 
parameter of 'RefCounted::nonTrivial23' is a raw pointer to ref-countable type 
'RefCounted'}}
     getFieldTrivial().nonTrivial24();
-    // expected-warning@-1{{Call argument for 'this' parameter is uncounted 
and unsafe}}
+    // expected-warning@-1{{Call argument 'this->getFieldTrivial()' for 'this' 
parameter of 'RefCounted::nonTrivial24' is a raw pointer to ref-countable type 
'RefCounted'}}
     getFieldTrivial().nonTrivial25();
-    // expected-warning@-1{{Call argument for 'this' parameter is uncounted 
and unsafe}}
+    // expected-warning@-1{{Call argument 'this->getFieldTrivial()' for 'this' 
parameter of 'RefCounted::nonTrivial25' is a raw pointer to ref-countable type 
'RefCounted'}}
     getFieldTrivial()->complex();
-    // expected-warning@-1{{Call argument for 'this' parameter is uncounted 
and unsafe}}
+    // expected-warning@-1{{Call argument 'this->getFieldTrivial()' for 'this' 
parameter of 'ComplexNumber::complex' is a raw pointer to ref-countable type 
'ComplexNumber'}}
+    // expected-warning@-2{{Call argument 'this->getFieldTrivial()' for 'this' 
parameter of 'RefCounted::operator->' is a raw pointer to ref-countable type 
'RefCounted'}}
     getFieldTrivial().nonTrivial26(ComparedObj { });
-    // expected-warning@-1{{Call argument for 'this' parameter is uncounted 
and unsafe}}
+    // expected-warning@-1{{Call argument 'this->getFieldTrivial()' for 'this' 
parameter of 'RefCounted::nonTrivial26' is a raw pointer to ref-countable type 
'RefCounted'}}
   }
 
   void setField(RefCounted*);
@@ -719,7 +720,7 @@ class UnrelatedClass2 {
     getFieldTrivialRecursively().trivial1(); // no-warning
     getFieldTrivialTernary()->trivial2(); // no-warning
     getFieldTrivialRecursively().someFunction();
-    // expected-warning@-1{{Call argument for 'this' parameter is uncounted 
and unsafe}}
+    // expected-warning@-1{{Call argument 'this->getFieldTrivialRecursively()' 
for 'this' parameter of 'RefCounted::someFunction' is a raw pointer to 
ref-countable type 'RefCounted'}}
     callSetField(getFieldTrivial(), refCountedObj()); // no-warning
   }
 };
diff --git a/clang/test/Analysis/Checkers/WebKit/uncounted-obj-arg.mm 
b/clang/test/Analysis/Checkers/WebKit/uncounted-obj-arg.mm
index b78a67610df3c..68680f677c946 100644
--- a/clang/test/Analysis/Checkers/WebKit/uncounted-obj-arg.mm
+++ b/clang/test/Analysis/Checkers/WebKit/uncounted-obj-arg.mm
@@ -24,7 +24,7 @@ - (void)execute {
   _obj1.get().method();
   (*_obj2).method();
   _obj3->method();
-  // expected-warning@-1{{Call argument for 'this' parameter is uncounted and 
unsafe}}
+  // expected-warning@-1{{Call argument 'self->_obj3' for 'this' parameter of 
'RefCountable::method' is a raw pointer to ref-countable type 'RefCountable'}}
 }
 
 - (RefPtr<RefCountable>)_protectedRefCountable {
diff --git 
a/clang/test/Analysis/Checkers/WebKit/uncounted-obj-const-v-muable.cpp 
b/clang/test/Analysis/Checkers/WebKit/uncounted-obj-const-v-muable.cpp
index 2721cd8474e1b..6ed0cb7e61953 100644
--- a/clang/test/Analysis/Checkers/WebKit/uncounted-obj-const-v-muable.cpp
+++ b/clang/test/Analysis/Checkers/WebKit/uncounted-obj-const-v-muable.cpp
@@ -21,7 +21,7 @@ class Caller {
 void Caller::someFunction()
 {
     m_obj->constFunc();
-    // expected-warning@-1{{Call argument for 'this' parameter is uncounted 
and unsafe}}
+    // expected-warning@-1{{Call argument 'this->m_obj' for 'this' parameter 
of 'Object::constFunc' is a raw pointer to ref-countable type 'Object'}}
     m_obj->mutableFunc();
-    // expected-warning@-1{{Call argument for 'this' parameter is uncounted 
and unsafe}}
+    // expected-warning@-1{{Call argument 'this->m_obj' for 'this' parameter 
of 'Object::mutableFunc' is a raw pointer to ref-countable type 'Object'}}
 }
diff --git a/clang/test/Analysis/Checkers/WebKit/unretained-call-args-arc.mm 
b/clang/test/Analysis/Checkers/WebKit/unretained-call-args-arc.mm
index 2763d8a188d8a..5e6b32ec62cad 100644
--- a/clang/test/Analysis/Checkers/WebKit/unretained-call-args-arc.mm
+++ b/clang/test/Analysis/Checkers/WebKit/unretained-call-args-arc.mm
@@ -14,7 +14,7 @@
 void foo() {
   [provide() doWork];
   CFArrayAppendValue(provide_cf(), nullptr);
-  // expected-warning@-1{{Call argument for parameter 'theArray' is unretained 
and unsafe [alpha.webkit.UnretainedCallArgsChecker]}}
+  // expected-warning@-1{{Call argument 'provide_cf()' for parameter 
'theArray' of 'CFArrayAppendValue' is a retainable type 'CFMutableArrayRef'}}
   dispatch_queue_get_label(provide_os());
 }
 
@@ -35,7 +35,7 @@ void use_const_global() {
 dispatch_queue_t provide_dispatch();
 void use_const_local() {
   doWork(provide_str(), provide_dict(), provide_dispatch());
-  // expected-warning@-1{{Call argument for parameter 'dict' is unretained and 
unsafe}}
+  // expected-warning@-1{{Call argument 'provide_dict()' for parameter 'dict' 
of 'const_global::doWork' is a retainable type 'CFDictionaryRef'}}
 }
 
 } // namespace const_global
@@ -50,7 +50,7 @@ - (void)foo:(SomeObj*)obj {
   [obj doWork];
   [provide() doWork];
   CFArrayAppendValue(provide_cf(), nullptr);
-  // expected-warning@-1{{Call argument for parameter 'theArray' is unretained 
and unsafe [alpha.webkit.UnretainedCallArgsChecker]}}
+  // expected-warning@-1{{Call argument 'provide_cf()' for parameter 
'theArray' of 'CFArrayAppendValue' is a retainable type 'CFMutableArrayRef'}}
 }
 
 - (SomeObj *)getSomeObj {
diff --git a/clang/test/Analysis/Checkers/WebKit/unretained-call-args-member.mm 
b/clang/test/Analysis/Checkers/WebKit/unretained-call-args-member.mm
index 8f48927a0c62a..ca0b5963a51d5 100644
--- a/clang/test/Analysis/Checkers/WebKit/unretained-call-args-member.mm
+++ b/clang/test/Analysis/Checkers/WebKit/unretained-call-args-member.mm
@@ -20,7 +20,7 @@
 
 void Foo::bar() {
   [m_constObj doWork]; // no-warning
-  [m_obj doWork]; // expected-warning{{Receiver is unretained and unsafe}}
+  [m_obj doWork]; // expected-warning{{Receiver 'this->m_obj' of 
'SomeObj::doWork' is a raw pointer to retainable type 'SomeObj'}}
 }
 
 } // namespace call_args_const_retainptr_member
@@ -39,7 +39,7 @@
 
 void Foo::bar() {
   consume_cf(m_cf1.get()); // no-warning
-  consume_cf(m_cf2.get()); // expected-warning{{Call argument is unretained 
and unsafe}}
+  consume_cf(m_cf2.get()); // expected-warning{{Call argument 
'this->m_cf2.get()' of 'consume_cf' is a retainable type 'CFArrayRef'}}
 }
 
 } // namespace call_args_const_retainptr_cf_member
@@ -56,7 +56,7 @@
 
 void Bar::baz() {
   [m_constObj doWork]; // no-warning
-  [m_obj doWork]; // expected-warning{{Receiver is unretained and unsafe}}
+  [m_obj doWork]; // expected-warning{{Receiver 'this->m_obj' of 
'SomeObj::doWork' is a raw pointer to retainable type 'SomeObj'}}
 }
 
 } // namespace call_args_const_retainptr_struct_member
@@ -73,7 +73,7 @@
 
 void Bar::baz() {
   consume_cf(m_cf1.get()); // no-warning
-  consume_cf(m_cf2.get()); // expected-warning{{Call argument is unretained 
and unsafe}}
+  consume_cf(m_cf2.get()); // expected-warning{{Call argument 
'this->m_cf2.get()' of 'consume_cf' is a retainable type 'CFArrayRef'}}
 }
 
 } // namespace call_args_const_retainptr_cf_struct_member
@@ -92,7 +92,7 @@
 
 void Foo::bar() {
   consume_obj(m_constObj.get()); // no-warning
-  consume_obj(m_obj.get()); // expected-warning{{Call argument is unretained 
and unsafe}}
+  consume_obj(m_obj.get()); // expected-warning{{Call argument 
'this->m_obj.get()' of 'consume_obj' is a retainable type 
'WTF::RetainPtr<SomeObj>::PtrType'}}
 }
 
 } // namespace call_args_const_retainptr_get_as_objc_arg
@@ -111,7 +111,7 @@
 
 void Foo::bar() {
   consume_obj(m_constObj); // no-warning
-  consume_obj(m_obj); // expected-warning{{Call argument is unretained and 
unsafe}}
+  consume_obj(m_obj); // expected-warning{{Call argument 'this->m_obj' of 
'consume_obj' is a retainable type 'WTF::RetainPtr<SomeObj>::PtrType'}}
 }
 
 } // namespace call_args_const_retainptr_implicit_conv_arg
@@ -130,7 +130,7 @@
 
 void Foo::bar() {
   consume_obj(m_constObj.get()); // no-warning
-  consume_obj(m_obj.get()); // expected-warning{{Call argument is unretained 
and unsafe}}
+  consume_obj(m_obj.get()); // expected-warning{{Call argument 
'this->m_obj.get()' of 'consume_obj' is a raw pointer to retainable type 
'SomeObj'}}
 }
 
 } // namespace call_args_const_osobjectptr_member
@@ -149,7 +149,7 @@
 
 void Foo::bar() {
   [m_constObj doWork]; // no-warning
-  [m_obj doWork]; // expected-warning{{Receiver is unretained and unsafe}}
+  [m_obj doWork]; // expected-warning{{Receiver 'this->m_obj' of 
'SomeObj::doWork' is a raw pointer to retainable type 'SomeObj'}}
 }
 
 } // namespace call_args_const_osobjectptr_receiver
diff --git a/clang/test/Analysis/Checkers/WebKit/unretained-call-args.mm 
b/clang/test/Analysis/Checkers/WebKit/unretained-call-args.mm
index 6bc1c7c089ac6..7fcfb0965c808 100644
--- a/clang/test/Analysis/Checkers/WebKit/unretained-call-args.mm
+++ b/clang/test/Analysis/Checkers/WebKit/unretained-call-args.mm
@@ -22,11 +22,11 @@
 namespace simple {
   void foo() {
     consume_obj(provide());
-    // expected-warning@-1{{Call argument is unretained and unsafe}}
+    // expected-warning@-1{{Call argument 'provide()' of 'consume_obj' is a 
raw pointer to retainable type 'SomeObj'}}
     consume_cf(provide_cf());
-    // expected-warning@-1{{Call argument is unretained and unsafe}}
+    // expected-warning@-1{{Call argument 'provide_cf()' of 'consume_cf' is a 
retainable type 'CFMutableArrayRef'}}
     consume_dispatch(provide_dispatch());
-    // expected-warning@-1{{Call argument is unretained and unsafe}}
+    // expected-warning@-1{{Call argument 'provide_dispatch()' of 
'consume_dispatch' is a retainable type 'dispatch_queue_t'}}
   }
 
   // Test that the checker works with [[clang::suppress]].
@@ -41,17 +41,17 @@ void foo_suppressed() {
   void consume_retainable(int, SomeObj* foo, CFMutableArrayRef bar, 
dispatch_queue_t baz, bool);
   void foo() {
     consume_retainable(42, provide(), provide_cf(), provide_dispatch(), true);
-    // expected-warning@-1{{Call argument for parameter 'foo' is unretained 
and unsafe}}
-    // expected-warning@-2{{Call argument for parameter 'bar' is unretained 
and unsafe}}
-    // expected-warning@-3{{Call argument for parameter 'baz' is unretained 
and unsafe}}
+    // expected-warning@-1{{Call argument 'provide()' for parameter 'foo' of 
'multi_arg::consume_retainable' is a raw pointer to retainable type 'SomeObj'}}
+    // expected-warning@-2{{Call argument 'provide_cf()' for parameter 'bar' 
of 'multi_arg::consume_retainable' is a retainable type 'CFMutableArrayRef'}}
+    // expected-warning@-3{{Call argument 'provide_dispatch()' for parameter 
'baz' of 'multi_arg::consume_retainable' is a retainable type 
'dispatch_queue_t'}}
   }
 
   void consume_retainable(SomeObj* foo, ...);
   void bar() {
     consume_retainable(provide(), 1, provide_cf(), 
RetainPtr<CFMutableArrayRef> { provide_cf() }.get(), provide_dispatch());
-    // expected-warning@-1{{Call argument for parameter 'foo' is unretained 
and unsafe}}
-    // expected-warning@-2{{Call argument is unretained and unsafe}}
-    // expected-warning@-3{{Call argument is unretained and unsafe}}
+    // expected-warning@-1{{Call argument 'provide()' for parameter 'foo' of 
'multi_arg::consume_retainable' is a raw pointer to retainable type 'SomeObj'}}
+    // expected-warning@-2{{Call argument 'provide_cf()' of 
'multi_arg::consume_retainable' is a retainable type 'CFMutableArrayRef'}}
+    // expected-warning@-3{{Call argument 'provide_dispatch()' of 
'multi_arg::consume_retainable' is a retainable type 'dispatch_queue_t'}}
      consume_retainable(RetainPtr<SomeObj> { provide() }.get(), 1, 
RetainPtr<CFMutableArrayRef> { provide_cf() }.get());
   }
 }
@@ -78,11 +78,11 @@ void foo() {
     Consumer c;
 
     c.consume_obj(provide());
-    // expected-warning@-1{{Call argument for parameter 'ptr' is unretained 
and unsafe}}
+    // expected-warning@-1{{Call argument 'provide()' for parameter 'ptr' of 
'methods::Consumer::consume_obj' is a raw pointer to retainable type 'SomeObj'}}
     c.consume_cf(provide_cf());
-    // expected-warning@-1{{Call argument for parameter 'ref' is unretained 
and unsafe}}
+    // expected-warning@-1{{Call argument 'provide_cf()' for parameter 'ref' 
of 'methods::Consumer::consume_cf' is a retainable type 'CFMutableArrayRef'}}
     c.consume_dispatch(provide_dispatch());
-    // expected-warning@-1{{Call argument for parameter 'ptr' is unretained 
and unsafe}}
+    // expected-warning@-1{{Call argument 'provide_dispatch()' for parameter 
'ptr' of 'methods::Consumer::consume_dispatch' is a retainable type 
'dispatch_queue_t'}}
   }
 
   void foo2() {
@@ -90,19 +90,19 @@ void foo2() {
       void consume(SomeObj*) { some_function(); }
       void whatever() {
         consume(provide());
-        // expected-warning@-1{{Call argument is unretained and unsafe}}
+        // expected-warning@-1{{Call argument 'provide()' of 
'methods::foo2()::Consumer::consume' is a raw pointer to retainable type 
'SomeObj'}}
       }
 
       void consume_cf(CFMutableArrayRef) { some_function(); }
       void something() {
         consume_cf(provide_cf());
-        // expected-warning@-1{{Call argument is unretained and unsafe}}
+        // expected-warning@-1{{Call argument 'provide_cf()' of 
'methods::foo2()::Consumer::consume_cf' is a retainable type 
'CFMutableArrayRef'}}
       }
 
       void consume_dispatch(dispatch_queue_t) { some_function(); }
       void anything() {
         consume_dispatch(provide_dispatch());
-        // expected-warning@-1{{Call argument is unretained and unsafe}}
+        // expected-warning@-1{{Call argument 'provide_dispatch()' of 
'methods::foo2()::Consumer::consume_dispatch' is a retainable type 
'dispatch_queue_t'}}
       }
     };
   }
@@ -112,19 +112,19 @@ void foo3() {
       void consume(SomeObj*) { some_function(); }
       void whatever() {
         this->consume(provide());
-        // expected-warning@-1{{Call argument is unretained and unsafe}}
+        // expected-warning@-1{{Call argument 'provide()' of 
'methods::foo3()::Consumer::consume' is a raw pointer to retainable type 
'SomeObj'}}
       }
 
       void consume_cf(CFMutableArrayRef) { some_function(); }
       void something() {
         this->consume_cf(provide_cf());
-        // expected-warning@-1{{Call argument is unretained and unsafe}}
+        // expected-warning@-1{{Call argument 'provide_cf()' of 
'methods::foo3()::Consumer::consume_cf' is a retainable type 
'CFMutableArrayRef'}}
       }
 
       void consume_dispatch(dispatch_queue_t) { some_function(); }
       void anything() {
         this->consume_dispatch(provide_dispatch());
-        // expected-warning@-1{{Call argument is unretained and unsafe}}
+        // expected-warning@-1{{Call argument 'provide_dispatch()' of 
'methods::foo3()::Consumer::consume_dispatch' is a retainable type 
'dispatch_queue_t'}}
       }
     };
   }
@@ -134,16 +134,16 @@ void anything() {
 namespace casts {
   void foo() {
     consume_obj(provide());
-    // expected-warning@-1{{Call argument is unretained and unsafe}}
+    // expected-warning@-1{{Call argument 'provide()' of 'consume_obj' is a 
raw pointer to retainable type 'SomeObj'}}
 
     consume_obj(static_cast<OtherObj*>(provide()));
-    // expected-warning@-1{{Call argument is unretained and unsafe}}
+    // expected-warning@-1{{Call argument 'static_cast<OtherObj *>(provide())' 
of 'consume_obj' is a raw pointer to retainable type 'SomeObj'}}
 
     consume_obj(reinterpret_cast<OtherObj*>(provide()));
-    // expected-warning@-1{{Call argument is unretained and unsafe}}
+    // expected-warning@-1{{Call argument 'reinterpret_cast<OtherObj 
*>(provide())' of 'consume_obj' is a raw pointer to retainable type 'SomeObj'}}
 
     consume_obj(downcast<OtherObj>(provide()));
-    // expected-warning@-1{{Call argument is unretained and unsafe}}
+    // expected-warning@-1{{Call argument 'downcast<OtherObj>(provide())' of 
'consume_obj' is a raw pointer to retainable type 'SomeObj'}}
   }
 }
 
@@ -167,7 +167,7 @@ void foo() {
     Decoy D;
 
     consume_obj(D.get());
-    // expected-warning@-1{{Call argument is unretained and unsafe}}
+    // expected-warning@-1{{Call argument 'D.get()' of 'consume_obj' is a raw 
pointer to retainable type 'SomeObj'}}
   }
 
   struct Decoy2 {
@@ -178,7 +178,7 @@ void bar() {
     Decoy2 D;
 
     consume_cf(D.get());
-    // expected-warning@-1{{Call argument is unretained and unsafe}}
+    // expected-warning@-1{{Call argument 'D.get()' of 'consume_cf' is a 
retainable type 'CFMutableArrayRef'}}
   }
 }
 
@@ -260,13 +260,13 @@ void baz(Consumer* consumer, dispatch_queue_t param) {
   dispatch_queue_t global_dispatch;
 
   void function_with_default_arg1(SomeObj* param = global);
-  // expected-warning@-1{{Call argument for parameter 'param' is unretained 
and unsafe}}
+  // expected-warning@-1{{Call argument 'global' for parameter 'param' of 
'default_arg::function_with_default_arg1' is a raw pointer to retainable type 
'SomeObj'}}
 
   void function_with_default_arg2(CFMutableArrayRef param = global_cf);
-  // expected-warning@-1{{Call argument for parameter 'param' is unretained 
and unsafe}}
+  // expected-warning@-1{{Call argument 'global_cf' for parameter 'param' of 
'default_arg::function_with_default_arg2' is a retainable type 
'CFMutableArrayRef'}}
 
   void function_with_default_arg3(dispatch_queue_t param = global_dispatch);
-  // expected-warning@-1{{Call argument for parameter 'param' is unretained 
and unsafe}}
+  // expected-warning@-1{{Call argument 'global_dispatch' for parameter 
'param' of 'default_arg::function_with_default_arg3' is a retainable type 
'dispatch_queue_t'}}
 
   void foo() {
     function_with_default_arg1();
@@ -281,17 +281,17 @@ void foo() {
 
   void foo() {
     [provide() doWork];
-    // expected-warning@-1{{Receiver is unretained and unsafe}}
+    // expected-warning@-1{{Receiver 'provide()' of 'SomeObj::doWork' is a raw 
pointer to retainable type 'SomeObj'}}
     [protectedProvide().get() doWork];
 
     CFArrayAppendValue(provide_cf(), nullptr);
-    // expected-warning@-1{{Call argument for parameter 'theArray' is 
unretained and unsafe}}
+    // expected-warning@-1{{Call argument 'provide_cf()' for parameter 
'theArray' of 'CFArrayAppendValue' is a retainable type 'CFMutableArrayRef'}}
     CFArrayAppendValue(protectedProvideCF(), nullptr);
   };
 
   void bar() {
     [downcast<OtherObj>(protectedProvide().get()) 
doMoreWork:downcast<OtherObj>(provide())];
-    // expected-warning@-1{{Call argument for parameter 'other' is unretained 
and unsafe}}
+    // expected-warning@-1{{Call argument 'downcast<OtherObj>(provide())' for 
parameter 'other' of 'OtherObj::doMoreWork:' is a raw pointer to retainable 
type 'OtherObj'}}
     [protectedProvide().get() doWork];
   };
 
@@ -312,13 +312,13 @@ void bar() {
   void foo() {
     Foo f;
     f + global;
-    // expected-warning@-1{{Call argument for parameter 'bad' is unretained 
and unsafe}}
+    // expected-warning@-1{{Call argument 'global' for parameter 'bad' of 
'cxx_member_operator_call::Foo::operator+' is a raw pointer to retainable type 
'SomeObj'}}
     f - global;
-    // expected-warning@-1{{Call argument for parameter 'bad' is unretained 
and unsafe}}
+    // expected-warning@-1{{Call argument 'global' for parameter 'bad' of 
'cxx_member_operator_call::operator-' is a raw pointer to retainable type 
'SomeObj'}}
     f(global);
-    // expected-warning@-1{{Call argument for parameter 'bad' is unretained 
and unsafe}}
+    // expected-warning@-1{{Call argument 'global' for parameter 'bad' of 
'cxx_member_operator_call::Foo::operator()' is a raw pointer to retainable type 
'SomeObj'}}
     f << global_dispatch;
-    // expected-warning@-1{{Call argument for parameter 'bad' is unretained 
and unsafe}}
+    // expected-warning@-1{{Call argument 'global_dispatch' for parameter 
'bad' of 'cxx_member_operator_call::Foo::operator<<' is a retainable type 
'dispatch_queue_t'}}
   }
 }
 
@@ -346,23 +346,23 @@ void foo(bool v) {
     bar(v ? nullptr : provideProtected().get());
     bar(baz() ? provideProtected().get() : nullptr);
     bar(v ? provide() : provideProtected().get());
-    // expected-warning@-1{{Call argument for parameter 'bad' is unretained 
and unsafe}}
+    // expected-warning@-1{{Call argument 'v ? provide() : 
provideProtected().get()' for parameter 'bad' of 'call_with_ptr_on_ref::bar' is 
a raw pointer to retainable type 'SomeObj'}}
     bar(v ? provideProtected().get() : provide());
-    // expected-warning@-1{{Call argument for parameter 'bad' is unretained 
and unsafe}}
+    // expected-warning@-1{{Call argument 'v ? provideProtected().get() : 
provide()' for parameter 'bad' of 'call_with_ptr_on_ref::bar' is a raw pointer 
to retainable type 'SomeObj'}}
 
     bar_cf(v ? nullptr : provideProtectedCF().get());
     bar_cf(baz() ? provideProtectedCF().get() : nullptr);
     bar_cf(v ? provide_cf() : provideProtectedCF().get());
-    // expected-warning@-1{{Call argument for parameter 'bad' is unretained 
and unsafe}}
+    // expected-warning@-1{{Call argument 'v ? provide_cf() : 
provideProtectedCF().get()' for parameter 'bad' of 
'call_with_ptr_on_ref::bar_cf' is a raw pointer to retainable type '__CFArray'}}
     bar_cf(v ? provideProtectedCF().get() : provide_cf());
-    // expected-warning@-1{{Call argument for parameter 'bad' is unretained 
and unsafe}}
+    // expected-warning@-1{{Call argument 'v ? provideProtectedCF().get() : 
provide_cf()' for parameter 'bad' of 'call_with_ptr_on_ref::bar_cf' is a raw 
pointer to retainable type '__CFArray'}}
 
     bar_dispatch(v ? nullptr : provideProtectedDispatch().get());
     bar_dispatch(baz() ? provideProtectedDispatch().get() : nullptr);
     bar_dispatch(v ? provide_dispatch() : provideProtectedDispatch().get());
-    // expected-warning@-1{{Call argument is unretained and unsafe}}
+    // expected-warning@-1{{Call argument 'v ? provide_dispatch() : 
provideProtectedDispatch(...' of 'call_with_ptr_on_ref::bar_dispatch' is a raw 
pointer to retainable type 'NSObject'}}
     bar_dispatch(v ? provideProtectedDispatch().get() : provide_dispatch());
-    // expected-warning@-1{{Call argument is unretained and unsafe}}
+    // expected-warning@-1{{Call argument 'v ? 
provideProtectedDispatch().get() : provide_dis...' of 
'call_with_ptr_on_ref::bar_dispatch' is a raw pointer to retainable type 
'NSObject'}}
   }
 }
 
@@ -516,9 +516,9 @@ void use_const_global() {
 CFDictionaryRef provide_dict();
 void use_const_local() {
   doWork(provide_str(), provide_dict(), provide_dispatch());
-  // expected-warning@-1{{Call argument for parameter 'str' is unretained and 
unsafe}}
-  // expected-warning@-2{{Call argument for parameter 'dict' is unretained and 
unsafe}}
-  // expected-warning@-3{{Call argument for parameter 'dispatch' is unretained 
and unsafe}}
+  // expected-warning@-1{{Call argument 'provide_str()' for parameter 'str' of 
'const_global::doWork' is a raw pointer to retainable type 'NSString}}
+  // expected-warning@-2{{Call argument 'provide_dict()' for parameter 'dict' 
of 'const_global::doWork' is a retainable type 'CFDictionaryRef'}}
+  // expected-warning@-3{{Call argument 'provide_dispatch()' for parameter 
'dispatch' of 'const_global::doWork' is a retainable type 'dispatch_queue_t'}}
 }
 
 } // namespace const_global
@@ -541,7 +541,7 @@ bool foo(NSString *obj) {
 
 bool bar(NSObject *obj, Bar *bar, SomeObjectSingleton someObjSingleton) {
   return [obj isKindOfClass:(bar->*someObjSingleton)()];
-  // expected-warning@-1{{Call argument for parameter 'aClass' is unretained 
and unsafe}}
+  // expected-warning@-1{{Call argument '(bar ->* someObjSingleton)()' for 
parameter 'aClass' of 'NSObject::isKindOfClass:' is a retainable type 'Class'}}
 }
 
 bool baz(NSObject *obj) {
@@ -656,9 +656,9 @@ - (void)doWork:(NSString *)msg, ... {
 - (void)doWorkOnSelf {
   [self doWork:nil];
   [self doWork:@"hello", provide(), provide_cf(), provide_dispatch()];
-  // expected-warning@-1{{Call argument is unretained and unsafe}}
-  // expected-warning@-2{{Call argument is unretained and unsafe}}
-  // expected-warning@-3{{Call argument is unretained and unsafe}}
+  // expected-warning@-1{{Call argument 'provide()' of 'TestObject::doWork:' 
is a raw pointer to retainable type 'SomeObj'}}
+  // expected-warning@-2{{Call argument 'provide_cf()' of 
'TestObject::doWork:' is a retainable type 'CFMutableArrayRef'}}
+  // expected-warning@-3{{Call argument 'provide_dispatch()' of 
'TestObject::doWork:' is a retainable type 'dispatch_queue_t'}}
   [self doWork:@"hello", RetainPtr<SomeObj> { provide() }.get(), 
RetainPtr<CFMutableArrayRef> { provide_cf() }.get(), OSObjectPtr { 
provide_dispatch() }.get()];
   [self doWork:__null];
   [self doWork:nil];
@@ -681,7 +681,7 @@ + (SomeObj *)sharedObj
 
 - (void)doWorkOnSomeObj {
     [[self getSomeObj] doWork];
-    // expected-warning@-1{{Receiver is unretained and unsafe}}
+    // expected-warning@-1{{Receiver '[self getSomeObj]' of 'SomeObj::doWork' 
is a raw pointer to retainable type 'SomeObj'}}
     [[TestObject sharedObj] doWork];
 }
 
diff --git a/clang/test/Analysis/Checkers/WebKit/unretained-obj-arg.mm 
b/clang/test/Analysis/Checkers/WebKit/unretained-obj-arg.mm
index 5c78b21d6c94f..faa9e932ec33d 100644
--- a/clang/test/Analysis/Checkers/WebKit/unretained-obj-arg.mm
+++ b/clang/test/Analysis/Checkers/WebKit/unretained-obj-arg.mm
@@ -11,8 +11,8 @@
 void foo() {
   consumeCFString(kCFURLTagNamesKey);
   consumeCFString(LocalGlobalCFString);
-    // expected-warning@-1{{Call argument is unretained and unsafe}}
+    // expected-warning@-1{{Call argument 'LocalGlobalCFString' of 
'consumeCFString' is a retainable type 'CFStringRef'}}
   consumeNSString(NSApplicationDidBecomeActiveNotification);
   consumeNSString(LocalGlobalNSString);
-    // expected-warning@-1{{Call argument is unretained and unsafe}}
+    // expected-warning@-1{{Call argument 'LocalGlobalNSString' of 
'consumeNSString' is a raw pointer to retainable type 'NSString'}}
 }

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to