[libc-commits] [libc] [libc] Resolve multi-line comment error (PR #117636)

Caslyn Tonelli via libc-commits libc-commits at lists.llvm.org
Mon Nov 25 14:36:56 PST 2024


https://github.com/Caslyn updated https://github.com/llvm/llvm-project/pull/117636

>From 934a20329c6b9057207ad23262cf1b28d9719f83 Mon Sep 17 00:00:00 2001
From: Caslyn Tonelli <caslyn at google.com>
Date: Mon, 25 Nov 2024 14:19:48 -0800
Subject: [PATCH 1/2] Resolve multi-line comment error

---
 libc/src/__support/common.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libc/src/__support/common.h b/libc/src/__support/common.h
index 79803a346f692e..a9beeb38cc1fa7 100644
--- a/libc/src/__support/common.h
+++ b/libc/src/__support/common.h
@@ -27,8 +27,7 @@
 //
 // For examples:
 // #define LLVM_LIBC_FUNCTION_ATTR_memcpy LLVM_LIBC_EMPTY, [[gnu::weak]]
-// #define LLVM_LIBC_FUNCTION_ATTR_memchr LLVM_LIBC_EMPTY, [[gnu::weak]]       \
-//                                        [[gnu::visibility("default")]]
+// #define LLVM_LIBC_FUNCTION_ATTR_memchr LLVM_LIBC_EMPTY, [[gnu::weak]] [[gnu::visibility("default")]]
 #define LLVM_LIBC_EMPTY
 
 #define GET_SECOND(first, second, ...) second

>From 0aca451cde28b01febdaad71617e722a89a87f7f Mon Sep 17 00:00:00 2001
From: Caslyn Tonelli <caslyn at google.com>
Date: Mon, 25 Nov 2024 14:36:37 -0800
Subject: [PATCH 2/2] disable clang-format for comment block

---
 libc/src/__support/common.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libc/src/__support/common.h b/libc/src/__support/common.h
index a9beeb38cc1fa7..42e8a79187facb 100644
--- a/libc/src/__support/common.h
+++ b/libc/src/__support/common.h
@@ -21,6 +21,7 @@
 #define LLVM_LIBC_FUNCTION_ATTR
 #endif
 
+// clang-format off
 // Allow each function `func` to have extra attributes specified by defining:
 // `LLVM_LIBC_FUNCTION_ATTR_func` macro, which should always start with
 // "LLVM_LIBC_EMPTY, "
@@ -28,6 +29,7 @@
 // For examples:
 // #define LLVM_LIBC_FUNCTION_ATTR_memcpy LLVM_LIBC_EMPTY, [[gnu::weak]]
 // #define LLVM_LIBC_FUNCTION_ATTR_memchr LLVM_LIBC_EMPTY, [[gnu::weak]] [[gnu::visibility("default")]]
+// clang-format on
 #define LLVM_LIBC_EMPTY
 
 #define GET_SECOND(first, second, ...) second



More information about the libc-commits mailing list