[libc-commits] [libc] 421fc04 - [libc] Fix deprecated operator"" syntax (#123259)

via libc-commits libc-commits at lists.llvm.org
Thu Jan 16 19:21:20 PST 2025


Author: Roland McGrath
Date: 2025-01-16T19:21:17-08:00
New Revision: 421fc0474867411c1da0f5ba086dc0c7305b04e2

URL: https://github.com/llvm/llvm-project/commit/421fc0474867411c1da0f5ba086dc0c7305b04e2
DIFF: https://github.com/llvm/llvm-project/commit/421fc0474867411c1da0f5ba086dc0c7305b04e2.diff

LOG: [libc] Fix deprecated operator"" syntax (#123259)

Added: 
    

Modified: 
    libc/test/src/unistd/getopt_test.cpp

Removed: 
    


################################################################################
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