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,h --
clang/tools/driver/cc1_main.cpp llvm/include/llvm/MC/MCSubtargetInfo.h
llvm/lib/MC/MCSubtargetInfo.cpp
llvm/lib/Target/AMDGPU/AMDGPURemoveIncompatibleFunctions.cpp
llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.cpp
llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp
llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
mlir/lib/Target/LLVMIR/Transforms/TargetToTargetFeatures.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/include/llvm/MC/MCSubtargetInfo.h
b/llvm/include/llvm/MC/MCSubtargetInfo.h
index 708de6d98..2fabfc595 100644
--- a/llvm/include/llvm/MC/MCSubtargetInfo.h
+++ b/llvm/include/llvm/MC/MCSubtargetInfo.h
@@ -40,9 +40,7 @@ struct SubtargetFeatureKV {
FeatureBitArray Implies; ///< K-V bit mask
/// Compare routine for std::lower_bound
- bool operator<(StringRef S) const {
- return StringRef(Key) < S;
- }
+ bool operator<(StringRef S) const { return StringRef(Key) < S; }
/// Compare routine for std::is_sorted.
bool operator<(const SubtargetFeatureKV &Other) const {
@@ -60,9 +58,7 @@ struct SubtargetSubTypeKV {
const MCSchedModel *SchedModel;
/// Compare routine for std::lower_bound
- bool operator<(StringRef S) const {
- return StringRef(Key) < S;
- }
+ bool operator<(StringRef S) const { return StringRef(Key) < S; }
/// Compare routine for std::is_sorted.
bool operator<(const SubtargetSubTypeKV &Other) const {
diff --git a/llvm/lib/MC/MCSubtargetInfo.cpp b/llvm/lib/MC/MCSubtargetInfo.cpp
index ed263a2b4..ecba74060 100644
--- a/llvm/lib/MC/MCSubtargetInfo.cpp
+++ b/llvm/lib/MC/MCSubtargetInfo.cpp
@@ -28,7 +28,8 @@ static const T *Find(StringRef S, ArrayRef<T> A) {
// Binary search the array
auto F = llvm::lower_bound(A, S);
// If not found then return NULL
- if (F == A.end() || StringRef(F->Key) != S) return nullptr;
+ if (F == A.end() || StringRef(F->Key) != S)
+ return nullptr;
// Return the found array item
return F;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/206234
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits