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/include/clang/CIR/Dialect/IR/CIRDialect.h 
clang/lib/CIR/Dialect/IR/CIRDialect.cpp 
clang/lib/CIR/Dialect/Transforms/CXXABILowering.cpp 
clang/lib/CIR/Dialect/Transforms/LoweringPrepare.cpp 
clang/lib/CIR/Dialect/Transforms/TargetLowering.cpp 
clang/lib/CIR/Dialect/Transforms/TargetLowering/LowerModule.cpp 
clang/lib/CIR/Lowering/CIRPasses.cpp 
clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.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/CIR/Dialect/IR/CIRDialect.cpp 
b/clang/lib/CIR/Dialect/IR/CIRDialect.cpp
index abcdc7cee..22cb0e104 100644
--- a/clang/lib/CIR/Dialect/IR/CIRDialect.cpp
+++ b/clang/lib/CIR/Dialect/IR/CIRDialect.cpp
@@ -313,9 +313,9 @@ cir::CIRDialect::verifyOperationAttribute(mlir::Operation 
*op,
     // "Validate" our triple by checking if it can successfully initialize into
     // a TargetInfo:
     if (!clang::targets::AllocateTarget(triple, targetOptions)) {
-      return op->emitOpError() << "unknown triple '" << tripleStr.getValue()
-                               << "' in '" << getTripleAttrName()
-                               << "' attribute";
+      return op->emitOpError()
+             << "unknown triple '" << tripleStr.getValue() << "' in '"
+             << getTripleAttrName() << "' attribute";
     }
   }
 
@@ -324,9 +324,9 @@ cir::CIRDialect::verifyOperationAttribute(mlir::Operation 
*op,
     // Checks whether or not OptInfoAttr is even parseable; opt info range
     // sanity checks are done in OptInfoAttr::verify.
     if (!optInfo)
-      return op->emitOpError() << "malformed "
-                               << cir::CIRDialect::getOptInfoAttrName()
-                               << " attribute";
+      return op->emitOpError()
+             << "malformed " << cir::CIRDialect::getOptInfoAttrName()
+             << " attribute";
   }
 
   return success();
@@ -447,7 +447,7 @@ static LogicalResult verifyProducedBy(Operation *op, Value 
operand,
 std::optional<llvm::Triple> cir::getTripleFromModule(mlir::ModuleOp mod) {
   // Verifying the validity of the triple attribute happens in
   // cir::CIRDialect::verifyOperationAttribute; verifyOperationAttribute
-  // should error first if we have an invalid attribute. 
+  // should error first if we have an invalid attribute.
   if (!mod->hasAttr(cir::CIRDialect::getTripleAttrName()))
     return std::nullopt;
 
diff --git a/clang/lib/CIR/Dialect/Transforms/CXXABILowering.cpp 
b/clang/lib/CIR/Dialect/Transforms/CXXABILowering.cpp
index 5e93779f3..6174f3a54 100644
--- a/clang/lib/CIR/Dialect/Transforms/CXXABILowering.cpp
+++ b/clang/lib/CIR/Dialect/Transforms/CXXABILowering.cpp
@@ -916,7 +916,7 @@ void CXXABILoweringPass::runOnOperation() {
   // If lower module is not available, skip the ABI lowering pass.
   if (!lowerModule) {
     mod.emitWarning("cannot create a CIR lower module, skipping the ")
-           << getName() << " pass: ";
+        << getName() << " pass: ";
     return;
   }
 
diff --git a/clang/lib/CIR/Dialect/Transforms/LoweringPrepare.cpp 
b/clang/lib/CIR/Dialect/Transforms/LoweringPrepare.cpp
index 36a8380c2..c0929df39 100644
--- a/clang/lib/CIR/Dialect/Transforms/LoweringPrepare.cpp
+++ b/clang/lib/CIR/Dialect/Transforms/LoweringPrepare.cpp
@@ -3316,7 +3316,7 @@ void LoweringPreparePass::runOnOperation() {
   lowerModule = cir::createLowerModule(mlirModule);
   if (!lowerModule) {
     mlirModule.emitError("cannot create a CIR lower module for ")
-           << getName() << " pass: ";
+        << getName() << " pass: ";
     return signalPassFailure();
   }
 
diff --git a/clang/lib/CIR/Dialect/Transforms/TargetLowering.cpp 
b/clang/lib/CIR/Dialect/Transforms/TargetLowering.cpp
index 40e956c54..8e087a4fb 100644
--- a/clang/lib/CIR/Dialect/Transforms/TargetLowering.cpp
+++ b/clang/lib/CIR/Dialect/Transforms/TargetLowering.cpp
@@ -300,7 +300,7 @@ void TargetLoweringPass::runOnOperation() {
   // If lower module is not available, skip the target lowering pass.
   if (!lowerModule) {
     mod.emitWarning("cannot create a CIR lower module, skipping the ")
-           << getName() << " pass: ";
+        << getName() << " pass: ";
     return;
   }
 
diff --git a/clang/lib/CIR/Dialect/Transforms/TargetLowering/LowerModule.cpp 
b/clang/lib/CIR/Dialect/Transforms/TargetLowering/LowerModule.cpp
index f05fe7a16..951836d8d 100644
--- a/clang/lib/CIR/Dialect/Transforms/TargetLowering/LowerModule.cpp
+++ b/clang/lib/CIR/Dialect/Transforms/TargetLowering/LowerModule.cpp
@@ -79,8 +79,7 @@ const TargetLoweringInfo 
&LowerModule::getTargetLoweringInfo() {
 }
 
 // TODO: not to create it every time
-std::unique_ptr<LowerModule>
-createLowerModule(mlir::ModuleOp module) {
+std::unique_ptr<LowerModule> createLowerModule(mlir::ModuleOp module) {
   // If the triple is not present, e.g. CIR modules parsed from text, we
   // cannot init LowerModule properly.
   assert(!cir::MissingFeatures::makeTripleAlwaysPresent());

``````````

</details>


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

Reply via email to