[Mlir-commits] [llvm] [mlir] eliminating g++ warnings (PR #105520)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Sep 3 01:01:03 PDT 2024


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 00c198b2ca6b6bee2d90e62d78816686ab056b1b d4cdeeb3d36fdc33ece4b011b19c60afa73b2904 --extensions cpp,h -- llvm/lib/IR/DebugProgramInstruction.cpp mlir/include/mlir/IR/OpDefinition.h mlir/include/mlir/Pass/Pass.h mlir/include/mlir/Query/Matcher/Marshallers.h mlir/lib/Analysis/FlatLinearValueConstraints.cpp mlir/lib/CAPI/IR/IR.cpp mlir/lib/Conversion/ArmSMEToLLVM/ArmSMEToLLVM.cpp mlir/lib/Conversion/IndexToSPIRV/IndexToSPIRV.cpp mlir/lib/Debug/DebuggerExecutionContextHook.cpp mlir/lib/Dialect/AMDGPU/IR/AMDGPUDialect.cpp mlir/lib/Dialect/ArmSME/Transforms/TileAllocation.cpp mlir/lib/Dialect/Async/Transforms/AsyncParallelFor.cpp mlir/lib/Dialect/Index/IR/IndexOps.cpp mlir/unittests/Bytecode/BytecodeTest.cpp mlir/unittests/Support/CyclicReplacerCacheTest.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/IR/DebugProgramInstruction.cpp b/llvm/lib/IR/DebugProgramInstruction.cpp
index 8d1eaae7f2..0db908211b 100644
--- a/llvm/lib/IR/DebugProgramInstruction.cpp
+++ b/llvm/lib/IR/DebugProgramInstruction.cpp
@@ -477,8 +477,8 @@ Value *DbgVariableRecord::getAddress() const {
     return V->getValue();
 
   // When the value goes to null, it gets replaced by an empty MDNode.
-  assert((!MD ||
-         !cast<MDNode>(MD)->getNumOperands()) && "Expected an empty MDNode");
+  assert((!MD || !cast<MDNode>(MD)->getNumOperands()) &&
+         "Expected an empty MDNode");
   return nullptr;
 }
 

``````````

</details>


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


More information about the Mlir-commits mailing list