[llvm] [llvm][TypeSize] Fix addition/subtraction in TypeSize. (PR #72979)

via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 21 03:46:56 PST 2023


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 7f740be4acddd8acf46796229c46117b735a9be8 4f6ce33c34d7001fa23e9165043406de04d76a8b -- llvm/include/llvm/Support/TypeSize.h llvm/unittests/Support/TypeSizeTest.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/unittests/Support/TypeSizeTest.cpp b/llvm/unittests/Support/TypeSizeTest.cpp
index 8ba68159e5..0331b4c00d 100644
--- a/llvm/unittests/Support/TypeSizeTest.cpp
+++ b/llvm/unittests/Support/TypeSizeTest.cpp
@@ -84,8 +84,10 @@ static_assert(alignTo(TypeSize::Fixed(7), 8) == TypeSize::Fixed(8));
 static_assert(TypeSize() == TypeSize::Fixed(0));
 static_assert(TypeSize() != TypeSize::Scalable(0));
 static_assert(!TypeSize().isScalable());
-static_assert(TypeSize::Fixed(0) + TypeSize::Scalable(8) == TypeSize::Scalable(8));
-static_assert(TypeSize::Scalable(8) + TypeSize::Fixed(0) == TypeSize::Scalable(8));
+static_assert(TypeSize::Fixed(0) + TypeSize::Scalable(8) ==
+              TypeSize::Scalable(8));
+static_assert(TypeSize::Scalable(8) + TypeSize::Fixed(0) ==
+              TypeSize::Scalable(8));
 static_assert(TypeSize::Fixed(8) + TypeSize::Scalable(0) == TypeSize::Fixed(8));
 static_assert(TypeSize::Scalable(0) + TypeSize::Fixed(8) == TypeSize::Fixed(8));
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/72979


More information about the llvm-commits mailing list