[libc-commits] [libc] [libc] Fix deprecated operator"" syntax (PR #123259)
Roland McGrath via libc-commits
libc-commits at lists.llvm.org
Thu Jan 16 16:12:20 PST 2025
https://github.com/frobtech created https://github.com/llvm/llvm-project/pull/123259
None
>From 5a9ce3bcb9df2b52179a094e4c8573b633499a50 Mon Sep 17 00:00:00 2001
From: Roland McGrath <mcgrathr at google.com>
Date: Thu, 16 Jan 2025 16:11:30 -0800
Subject: [PATCH] [libc] Fix deprecated operator"" syntax
---
libc/test/src/unistd/getopt_test.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libc/test/src/unistd/getopt_test.cpp b/libc/test/src/unistd/getopt_test.cpp
index 8217f7bb6e7313..1a31094e98fc89 100644
--- a/libc/test/src/unistd/getopt_test.cpp
+++ b/libc/test/src/unistd/getopt_test.cpp
@@ -79,7 +79,7 @@ struct LlvmLibcGetoptTest : public LIBC_NAMESPACE::testing::Test {
// This is safe because getopt doesn't currently permute argv like GNU's getopt
// does so this just helps silence warnings.
-char *operator"" _c(const char *c, size_t) { return const_cast<char *>(c); }
+char *operator""_c(const char *c, size_t) { return const_cast<char *>(c); }
TEST_F(LlvmLibcGetoptTest, NoMatch) {
array<char *, 3> argv{"prog"_c, "arg1"_c, nullptr};
More information about the libc-commits
mailing list