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

Mark de Wever via libcxx-commits libcxx-commits at lists.llvm.org
Fri Mar 14 10:31:54 PDT 2025


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

This was discovered when using this name in #130500.

>From bcb4a9ffe2c1c5f68807c2759da73ac09890176c Mon Sep 17 00:00:00 2001
From: Mark de Wever <koraq at xs4all.nl>
Date: Fri, 14 Mar 2025 18:30:05 +0100
Subject: [PATCH] [libc++][test] Adds a test for a reserved name.

This was discovered when using this name in #130500.
---
 libcxx/test/libcxx/system_reserved_names.gen.py | 5 +++++
 1 file changed, 5 insertions(+)

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



More information about the libcxx-commits mailing list