================
@@ -523,7 +606,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>()) {
----------------
steakhal wrote:

The `ObjCObjectPointerType` and `TypedefType` are not really related.
Consequently, I think the satisfaction of the RHS does not depend on the LHS.
This means that you could likely simplify the condition to this:

It is because `isa<TypedefType>(T)` implies `!isa<ObjCObjectPointerType>(T)`.
```suggestion
    if (isa<TypedefType>(T)) {
```

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

Reply via email to