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

via libc-commits libc-commits at lists.llvm.org
Thu Jan 16 16:13:33 PST 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: Roland McGrath (frobtech)

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/123259.diff


1 Files Affected:

- (modified) libc/test/src/unistd/getopt_test.cpp (+1-1) 


``````````diff
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};

``````````

</details>


https://github.com/llvm/llvm-project/pull/123259


More information about the libc-commits mailing list