[clang] [CIR] Upstream local initialization for VectorType (PR #138107)
via cfe-commits
cfe-commits at lists.llvm.org
Thu May 1 03:35:45 PDT 2025
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 HEAD~1 HEAD --extensions h,cpp -- clang/lib/CIR/CodeGen/CIRGenExpr.cpp clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp clang/lib/CIR/Dialect/IR/CIRDialect.cpp clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.h clang/test/CIR/CodeGen/vector-ext.cpp clang/test/CIR/CodeGen/vector.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp b/clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp
index 53fa81e73..1cbeb871e 100644
--- a/clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp
@@ -1612,8 +1612,8 @@ mlir::Value ScalarExprEmitter::VisitInitListExpr(InitListExpr *e) {
if (numInitElements < vectorType.getSize()) {
mlir::TypedAttr zeroInitAttr =
cgf.getBuilder().getZeroInitAttr(vectorType.getElementType());
- cir::ConstantOp zeroValue =
- cgf.getBuilder().getConstant(cgf.getLoc(e->getSourceRange()), zeroInitAttr);
+ cir::ConstantOp zeroValue = cgf.getBuilder().getConstant(
+ cgf.getLoc(e->getSourceRange()), zeroInitAttr);
for (uint64_t i = numInitElements; i < vectorType.getSize(); ++i) {
elements.push_back(zeroValue);
``````````
</details>
https://github.com/llvm/llvm-project/pull/138107
More information about the cfe-commits
mailing list