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/AST/ByteCode/FixedPoint.h clang/lib/AST/ByteCode/Integral.h 
clang/lib/AST/ByteCode/InterpStack.cpp clang/lib/AST/ByteCode/InterpStack.h 
clang/lib/AST/ByteCode/Pointer.h --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/AST/ByteCode/InterpStack.h 
b/clang/lib/AST/ByteCode/InterpStack.h
index faaab371f..0944c2657 100644
--- a/clang/lib/AST/ByteCode/InterpStack.h
+++ b/clang/lib/AST/ByteCode/InterpStack.h
@@ -21,14 +21,14 @@
 namespace clang {
 namespace interp {
 
-template <class T>
-struct datasizeof_impl {
+template <class T> struct datasizeof_impl {
   LLVM_NO_UNIQUE_ADDRESS T v;
   char first_padding_byte;
 };
 
 template <class T>
-constexpr size_t datasizeof_v = offsetof(datasizeof_impl<T>, 
first_padding_byte);
+constexpr size_t datasizeof_v =
+    offsetof(datasizeof_impl<T>, first_padding_byte);
 
 /// Stack frame storing temporaries and parameters.
 class InterpStack final {
@@ -53,10 +53,10 @@ public:
         : v(std::forward<Args>(args)...), type(toPrimType<T>()) {}
 
     static constexpr size_t getPaddingSize() {
-      if constexpr (sizeof(T) < sizeof(void*))
-        return sizeof(void*) - datasizeof_v<T> - 1;
+      if constexpr (sizeof(T) < sizeof(void *))
+        return sizeof(void *) - datasizeof_v<T> - 1;
       else if constexpr (sizeof(T) == datasizeof_v<T>)
-        return sizeof(void*) - 1;
+        return sizeof(void *) - 1;
       else
         return sizeof(T) - datasizeof_v<T> - 1;
     }

``````````

</details>


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

Reply via email to