[libcxx-commits] [libcxx] [libc++][test] Adds a test for a reserved name. (PR #131363)

via libcxx-commits libcxx-commits at lists.llvm.org
Fri Mar 14 10:32:28 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libcxx

Author: Mark de Wever (mordante)

<details>
<summary>Changes</summary>

This was discovered when using this name in #<!-- -->130500.

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


1 Files Affected:

- (modified) libcxx/test/libcxx/system_reserved_names.gen.py (+5) 


``````````diff
diff --git a/libcxx/test/libcxx/system_reserved_names.gen.py b/libcxx/test/libcxx/system_reserved_names.gen.py
index f01126249c881..304c803b76c3d 100644
--- a/libcxx/test/libcxx/system_reserved_names.gen.py
+++ b/libcxx/test/libcxx/system_reserved_names.gen.py
@@ -119,6 +119,11 @@
 #define __acquire SYSTEM_RESERVED_NAME
 #define __release SYSTEM_RESERVED_NAME
 
+// Android and FreeBSD use this for __attribute__((__unused__))
+#if !defined(__FreeBSD__)  && !defined(__ANDROID__)
+#define __unused SYSTEM_RESERVED_NAME
+#endif
+
 // These names are not reserved, so the user can macro-define them.
 // These are intended to find improperly _Uglified template parameters.
 #define A SYSTEM_RESERVED_NAME

``````````

</details>


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


More information about the libcxx-commits mailing list