Hendrik =?utf-8?q?Hübner?=,Hendrik =?utf-8?q?Hübner?Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/[email protected]>
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 c,cpp,h --
clang/lib/CIR/CodeGen/Address.h clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp
clang/lib/CIR/CodeGen/CIRGenExpr.cpp clang/lib/CIR/CodeGen/CIRGenFunction.h
clang/lib/CIR/CodeGen/CIRGenTypes.cpp clang/test/CIR/CodeGen/atomic.c
--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/CIR/CodeGen/Address.h b/clang/lib/CIR/CodeGen/Address.h
index 02459c08b..a16c68f23 100644
--- a/clang/lib/CIR/CodeGen/Address.h
+++ b/clang/lib/CIR/CodeGen/Address.h
@@ -49,8 +49,8 @@ public:
Address(mlir::Value pointer, mlir::Type elementType,
clang::CharUnits alignment, bool isKnownNonNull)
- : isKnownNonNull(pointer, isKnownNonNull),
- elementType(elementType), alignment(alignment) {
+ : isKnownNonNull(pointer, isKnownNonNull), elementType(elementType),
+ alignment(alignment) {
assert(pointer && "Pointer cannot be null");
assert(elementType && "Element type cannot be null");
assert(!alignment.isZero() && "Alignment cannot be zero");
@@ -71,9 +71,7 @@ public:
}
static Address invalid() { return Address(nullptr); }
- bool isValid() const {
- return isKnownNonNull.getPointer() != nullptr;
- }
+ bool isValid() const { return isKnownNonNull.getPointer() != nullptr; }
/// Return address with different pointer, but same element type and
/// alignment.
@@ -112,8 +110,7 @@ public:
}
mlir::Type getType() const {
- assert(mlir::cast<cir::PointerType>(
- isKnownNonNull.getPointer().getType())
+ assert(mlir::cast<cir::PointerType>(isKnownNonNull.getPointer().getType())
.getPointee() == elementType);
return mlir::cast<cir::PointerType>(getPointer().getType());
@@ -121,8 +118,7 @@ public:
mlir::Type getElementType() const {
assert(isValid());
- assert(mlir::cast<cir::PointerType>(
- isKnownNonNull.getPointer().getType())
+ assert(mlir::cast<cir::PointerType>(isKnownNonNull.getPointer().getType())
.getPointee() == elementType);
return elementType;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/168347
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits