github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. 
:warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp,h -- 
clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.cpp 
clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.h 
clang/lib/StaticAnalyzer/Checkers/WebKit/RawPtrRefMemberChecker.cpp 
clang/test/Analysis/Checkers/WebKit/unchecked-members.cpp 
clang/test/Analysis/Checkers/WebKit/uncounted-members.cpp 
--diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git 
a/clang/lib/StaticAnalyzer/Checkers/WebKit/RawPtrRefMemberChecker.cpp 
b/clang/lib/StaticAnalyzer/Checkers/WebKit/RawPtrRefMemberChecker.cpp
index 1f0bbb09d..bef7310ae 100644
--- a/clang/lib/StaticAnalyzer/Checkers/WebKit/RawPtrRefMemberChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/WebKit/RawPtrRefMemberChecker.cpp
@@ -290,8 +290,7 @@ public:
 
   template <typename DeclType, typename PointeeType, typename ParentDeclType>
   void reportBug(const DeclType *Member, const Type *MemberType,
-                 const PointeeType *Pointee,
-                 const ParentDeclType *ClassCXXRD,
+                 const PointeeType *Pointee, const ParentDeclType *ClassCXXRD,
                  bool IsPtrToSafe = false) const {
     assert(Member);
     assert(MemberType);
@@ -359,9 +358,7 @@ public:
     return isUncountedPtr(QT.getCanonicalType());
   }
 
-  bool isSafePtr(QualType QT) const final {
-    return isRefPtrType(QT);
-  }
+  bool isSafePtr(QualType QT) const final { return isRefPtrType(QT); }
 
   const char *typeName() const final { return "ref-countable type"; }
 
@@ -380,9 +377,7 @@ public:
     return isUncheckedPtr(QT.getCanonicalType());
   }
 
-  bool isSafePtr(QualType QT) const final {
-    return isCheckedPtrType(QT);
-  }
+  bool isSafePtr(QualType QT) const final { return isCheckedPtrType(QT); }
 
   const char *typeName() const final { return "CheckedPtr capable type"; }
 
@@ -406,9 +401,7 @@ public:
     return RTC->isUnretained(QT, ignoreARC);
   }
 
-  bool isSafePtr(QualType QT) const final {
-    return isRetainPtrOrOSPtrType(QT);
-  }
+  bool isSafePtr(QualType QT) const final { return isRetainPtrOrOSPtrType(QT); 
}
 
   const char *typeName() const final { return "retainable type"; }
 
@@ -416,8 +409,8 @@ public:
     return "member variables must be a RetainPtr or OSObjectPtr";
   }
 
-  PrintDeclKind printPointer(llvm::raw_svector_ostream &Os,
-                             const Type *T, bool IsPtrToSafe) const final {
+  PrintDeclKind printPointer(llvm::raw_svector_ostream &Os, const Type *T,
+                             bool IsPtrToSafe) const final {
     // FIXME: Support IsPtrToSafe.
     if (!isa<ObjCObjectPointerType>(T) && T->getAs<TypedefType>()) {
       Os << typeName() << " ";

``````````

</details>


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

Reply via email to