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 cpp --
clang/test/CodeGenCXX/sanitize-default-init.cpp clang/lib/CodeGen/CGExprCXX.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
llvm/lib/Transforms/Instrumentation/MemorySanitizer.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/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
index f6928f936..eb2ed6b30 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
@@ -241,12 +241,10 @@ Instruction
*InstCombinerImpl::SimplifyAnyMemSet(AnyMemSetInst *MI) {
// value. Change to PoisonValue once #52930 is resolved.
// Postponed to SelectionDAG lowering phase.
// if (isa<UndefValue>(MI->getValue())) {
- // // Set the size of the copy to 0, it will be deleted on the next
iteration.
- // MI->setLength((uint64_t)0);
- // return MI;
+ // // Set the size of the copy to 0, it will be deleted on the next
+ // iteration. MI->setLength((uint64_t)0); return MI;
// }
-
// Extract the length and alignment and fill if they are constant.
ConstantInt *LenC = dyn_cast<ConstantInt>(MI->getLength());
ConstantInt *FillC = dyn_cast<ConstantInt>(MI->getValue());
diff --git a/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
b/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
index d7297d029..2edaa3a40 100644
--- a/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
@@ -1015,8 +1015,8 @@ void MemorySanitizer::initializeCallbacks(Module &M,
MemsetFn = M.getOrInsertFunction("__msan_memset",
TLI.getAttrList(C, {1}, /*Signed=*/true),
PtrTy, PtrTy, IRB.getInt32Ty(), IntptrTy);
- MsanPoisonFn = M.getOrInsertFunction("__msan_poison", IRB.getVoidTy(), PtrTy,
- IntptrTy);
+ MsanPoisonFn =
+ M.getOrInsertFunction("__msan_poison", IRB.getVoidTy(), PtrTy, IntptrTy);
MsanInstrumentAsmStoreFn = M.getOrInsertFunction(
"__msan_instrument_asm_store", IRB.getVoidTy(), PtrTy, IntptrTy);
@@ -3329,14 +3329,13 @@ struct MemorySanitizerVisitor : public
InstVisitor<MemorySanitizerVisitor> {
IRBuilder<> IRB(&I);
Value *Val = I.getArgOperand(1);
if (isa<UndefValue>(Val)) {
- IRB.CreateCall(MS.MsanPoisonFn,
- {I.getArgOperand(0),
- IRB.CreateIntCast(I.getArgOperand(2), MS.IntptrTy,
false)});
+ IRB.CreateCall(MS.MsanPoisonFn, {I.getArgOperand(0),
+ IRB.CreateIntCast(I.getArgOperand(2),
+ MS.IntptrTy, false)});
} else {
IRB.CreateCall(
MS.MemsetFn,
- {I.getArgOperand(0),
- IRB.CreateIntCast(Val, IRB.getInt32Ty(), false),
+ {I.getArgOperand(0), IRB.CreateIntCast(Val, IRB.getInt32Ty(), false),
IRB.CreateIntCast(I.getArgOperand(2), MS.IntptrTy, false)});
}
I.eraseFromParent();
``````````
</details>
https://github.com/llvm/llvm-project/pull/188001
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits