[libc-commits] [libc] [libc] implement insque and remque (PR #80305)
via libc-commits
libc-commits at lists.llvm.org
Thu Feb 1 08:09:37 PST 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 178719e86043c1e830a7e24de027a84f6f8ea28f 68ef7829e43dd055901e8a8c387f3ff895b64acb -- libc/src/__support/invasive_list.h libc/src/search/insque.cpp libc/src/search/insque.h libc/src/search/remque.cpp libc/src/search/remque.h libc/test/src/search/insque_test.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libc/src/__support/invasive_list.h b/libc/src/__support/invasive_list.h
index 2cf0e62bb2..97b292689f 100644
--- a/libc/src/__support/invasive_list.h
+++ b/libc/src/__support/invasive_list.h
@@ -10,7 +10,6 @@
//
//===----------------------------------------------------------------------===//
-
#ifndef LLVM_LIBC_SRC___SUPPORT_INVASIVE_QUEUE_H
#define LLVM_LIBC_SRC___SUPPORT_INVASIVE_QUEUE_H
@@ -25,7 +24,8 @@ struct InvasiveList {
InvasiveNodeHeader *prev;
};
- LIBC_INLINE static void insert(InvasiveNodeHeader *elem, InvasiveNodeHeader *prev) {
+ LIBC_INLINE static void insert(InvasiveNodeHeader *elem,
+ InvasiveNodeHeader *prev) {
if (!prev) {
// The list is linear and elem will be the only element.
elem->next = nullptr;
diff --git a/libc/src/search/insque.h b/libc/src/search/insque.h
index 90bac3a05f..e0fb69ed1d 100644
--- a/libc/src/search/insque.h
+++ b/libc/src/search/insque.h
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-
#ifndef LLVM_LIBC_SRC_SEARCH_INSQUE_H
#define LLVM_LIBC_SRC_SEARCH_INSQUE_H
diff --git a/libc/src/search/remque.h b/libc/src/search/remque.h
index 806951c041..51f225c004 100644
--- a/libc/src/search/remque.h
+++ b/libc/src/search/remque.h
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-
#ifndef LLVM_LIBC_SRC_SEARCH_REMQUE_H
#define LLVM_LIBC_SRC_SEARCH_REMQUE_H
``````````
</details>
https://github.com/llvm/llvm-project/pull/80305
More information about the libc-commits
mailing list