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 h,cpp -- 
clang/test/Analysis/ftl-concat-crash.cpp 
clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h 
clang/lib/StaticAnalyzer/Core/ExprEngine.cpp 
clang/lib/StaticAnalyzer/Core/ProgramState.cpp 
clang/lib/StaticAnalyzer/Core/RegionStore.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/Core/ProgramState.cpp 
b/clang/lib/StaticAnalyzer/Core/ProgramState.cpp
index 9f3c99685..4dae43787 100644
--- a/clang/lib/StaticAnalyzer/Core/ProgramState.cpp
+++ b/clang/lib/StaticAnalyzer/Core/ProgramState.cpp
@@ -23,7 +23,8 @@
 using namespace clang;
 using namespace ento;
 
-namespace clang { namespace ento {
+namespace clang {
+namespace ento {
 
 thread_local unsigned GlobalRecursionDepth = 0;
 /// Increments the number of times this state is referenced.
@@ -43,7 +44,8 @@ void ProgramStateRelease(const ProgramState *state) {
     Mgr.freeStates.push_back(s);
   }
 }
-}}
+} // namespace ento
+} // namespace clang
 
 ProgramState::ProgramState(ProgramStateManager *mgr, const Environment& env,
                  StoreRef st, GenericDataMap gdm)
diff --git a/clang/lib/StaticAnalyzer/Core/RegionStore.cpp 
b/clang/lib/StaticAnalyzer/Core/RegionStore.cpp
index 08e2955e6..703a5a877 100644
--- a/clang/lib/StaticAnalyzer/Core/RegionStore.cpp
+++ b/clang/lib/StaticAnalyzer/Core/RegionStore.cpp
@@ -40,11 +40,11 @@ using namespace ento;
 // Representation of binding keys.
 
//===----------------------------------------------------------------------===//
 
-
 namespace {
 class BindingKey {
 public:
   enum Kind { Default = 0x0, Direct = 0x1 };
+
 private:
   enum { Symbolic = 0x2 };
 
@@ -334,24 +334,20 @@ public:
                            SmallVectorImpl<SVal> &EscapedValuesDuringBind,
                            std::optional<unsigned> BindingsLeft,
                            unsigned RecursionLeft = 1000)
-      : RegionBindingsRef(Base),
-        RecursionLeft(RecursionLeft),
+      : RegionBindingsRef(Base), RecursionLeft(RecursionLeft),
         EscapedValuesDuringBind(&EscapedValuesDuringBind),
-        BindingsLeft(BindingsLeft) {
-  }
+        BindingsLeft(BindingsLeft) {}
 
   bool hasExhaustedBindingLimit() const {
     return BindingsLeft.has_value() && BindingsLeft.value() == 0;
   }
 
-  bool hasExhaustedRecursionLimit() const {
-    return RecursionLeft == 0;
-  }
+  bool hasExhaustedRecursionLimit() const { return RecursionLeft == 0; }
 
   LimitedRegionBindingsRef withRecursionDecreased() const {
-    return LimitedRegionBindingsRef{
-        *this, *EscapedValuesDuringBind, BindingsLeft,
-        RecursionLeft > 0 ? RecursionLeft - 1 : 0};
+    return LimitedRegionBindingsRef{*this, *EscapedValuesDuringBind,
+                                    BindingsLeft,
+                                    RecursionLeft > 0 ? RecursionLeft - 1 : 0};
   }
 
   LimitedRegionBindingsRef withValuesEscaped(SVal V) const {
@@ -408,6 +404,7 @@ public:
   }
 
   unsigned RecursionLeft;
+
 private:
   SmallVectorImpl<SVal> *EscapedValuesDuringBind; // nonnull
   std::optional<unsigned> BindingsLeft;
@@ -2537,7 +2534,7 @@ StoreRef RegionStoreManager::killBinding(Store ST, Loc L) 
{
 
 LimitedRegionBindingsRef
 RegionStoreManager::bind(LimitedRegionBindingsConstRef B, Loc L, SVal V) {
-  
+
   struct DepthGuard {
     DepthGuard() { ++GlobalRecursionDepth; }
     ~DepthGuard() { --GlobalRecursionDepth; }
@@ -2670,7 +2667,7 @@ std::optional<LimitedRegionBindingsRef> 
RegionStoreManager::tryBindSmallArray(
 LimitedRegionBindingsRef
 RegionStoreManager::bindArray(LimitedRegionBindingsConstRef B,
                               const TypedValueRegion *R, SVal Init) {
-  
+
   struct DepthGuard {
     DepthGuard() { ++GlobalRecursionDepth; }
     ~DepthGuard() { --GlobalRecursionDepth; }
@@ -2751,7 +2748,7 @@ 
RegionStoreManager::bindArray(LimitedRegionBindingsConstRef B,
 LimitedRegionBindingsRef
 RegionStoreManager::bindVector(LimitedRegionBindingsConstRef B,
                                const TypedValueRegion *R, SVal V) {
-  
+
   struct DepthGuard {
     DepthGuard() { ++GlobalRecursionDepth; }
     ~DepthGuard() { --GlobalRecursionDepth; }
@@ -2892,7 +2889,7 @@ std::optional<LimitedRegionBindingsRef> 
RegionStoreManager::tryBindSmallStruct(
 LimitedRegionBindingsRef
 RegionStoreManager::bindStruct(LimitedRegionBindingsConstRef B,
                                const TypedValueRegion *R, SVal V) {
-  
+
   struct DepthGuard {
     DepthGuard() { ++GlobalRecursionDepth; }
     ~DepthGuard() { --GlobalRecursionDepth; }
@@ -2908,7 +2905,7 @@ 
RegionStoreManager::bindStruct(LimitedRegionBindingsConstRef B,
   QualType T = R->getValueType();
   assert(T->isStructureOrClassType());
 
-  const RecordType* RT = T->castAs<RecordType>();
+  const RecordType *RT = T->castAs<RecordType>();
   const RecordDecl *RD = RT->getDecl();
 
   if (!RD->isCompleteDefinition())
@@ -3029,7 +3026,7 @@ 
RegionStoreManager::bindStruct(LimitedRegionBindingsConstRef B,
 LimitedRegionBindingsRef
 RegionStoreManager::bindAggregate(LimitedRegionBindingsConstRef B,
                                   const TypedRegion *R, SVal Val) {
-  
+
   struct DepthGuard {
     DepthGuard() { ++GlobalRecursionDepth; }
     ~DepthGuard() { --GlobalRecursionDepth; }

``````````

</details>


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

Reply via email to