-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Closed
Labels
Description
Below is a sample commit to showcase the bug. There are two lines added that conform to clang-format formatting.
diff --git a/llvm/lib/IR/Instructions.cpp b/llvm/lib/IR/Instructions.cpp
index f5039eb5126c..0e3f24fe4aa9 100644
--- a/llvm/lib/IR/Instructions.cpp
+++ b/llvm/lib/IR/Instructions.cpp
@@ -1647,6 +1647,8 @@ void AtomicRMWInst::Init(BinOp Operation, Value *Ptr, Value *Val,
"Ptr must be a pointer to Val type!");
assert(Ordering != AtomicOrdering::NotAtomic &&
"AtomicRMW instructions must be atomic!");
+ assert(Ordering != AtomicOrdering::NotAtomic &&
+ "AtomicRMW instructions must be atomic!");
}
AtomicRMWInst::AtomicRMWInst(BinOp Operation, Value *Ptr, Value *Val,
Running clang-format on the commit does not show any formatting changes. However, it returns non-zero exit code.
➜ clang/tools/clang-format/git-clang-format -v --binary /path/to/clang-format --diff HEAD~1 HEAD
Running clang-format on the following files:
llvm/lib/IR/Instructions.cpp
old tree: HEAD
new tree: 98edebbef1ca81ada0b968a3c0d65bbb6920cd59
➜ echo $?
1