[libcxx-commits] [libcxx] 8c72ff7 - [NFC] Renames a template parameter to avoid clashes with userspace names. (#76829)

via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jan 4 00:26:01 PST 2024


Author: bgra8
Date: 2024-01-04T09:25:57+01:00
New Revision: 8c72ff716b3e4b298695fa3faf6add860c6dbcb2

URL: https://github.com/llvm/llvm-project/commit/8c72ff716b3e4b298695fa3faf6add860c6dbcb2
DIFF: https://github.com/llvm/llvm-project/commit/8c72ff716b3e4b298695fa3faf6add860c6dbcb2.diff

LOG: [NFC] Renames a template parameter to avoid clashes with userspace names. (#76829)

Co-authored-by: Bogdan Graur <bgraur at google.com>

Added: 
    

Modified: 
    libcxx/include/__format/format_arg_store.h
    libcxx/test/libcxx/system_reserved_names.gen.py

Removed: 
    


################################################################################
diff  --git a/libcxx/include/__format/format_arg_store.h b/libcxx/include/__format/format_arg_store.h
index c481992d2d719a..066cd369eb8918 100644
--- a/libcxx/include/__format/format_arg_store.h
+++ b/libcxx/include/__format/format_arg_store.h
@@ -228,15 +228,15 @@ _LIBCPP_HIDE_FROM_ABI void __store_basic_format_arg(basic_format_arg<_Context>*
   ([&] { *__data++ = __format::__create_format_arg<_Context>(__args); }(), ...);
 }
 
-template <class _Context, size_t N>
+template <class _Context, size_t _Np>
 struct __packed_format_arg_store {
-  __basic_format_arg_value<_Context> __values_[N];
+  __basic_format_arg_value<_Context> __values_[_Np];
   uint64_t __types_ = 0;
 };
 
-template <class _Context, size_t N>
+template <class _Context, size_t _Np>
 struct __unpacked_format_arg_store {
-  basic_format_arg<_Context> __args_[N];
+  basic_format_arg<_Context> __args_[_Np];
 };
 
 } // namespace __format

diff  --git a/libcxx/test/libcxx/system_reserved_names.gen.py b/libcxx/test/libcxx/system_reserved_names.gen.py
index 8c4be97897f657..8ddd035ff2d258 100644
--- a/libcxx/test/libcxx/system_reserved_names.gen.py
+++ b/libcxx/test/libcxx/system_reserved_names.gen.py
@@ -131,6 +131,9 @@
 #define E SYSTEM_RESERVED_NAME
 #define Ep SYSTEM_RESERVED_NAME
 #define Es SYSTEM_RESERVED_NAME
+#define N SYSTEM_RESERVED_NAME
+#define Np SYSTEM_RESERVED_NAME
+#define Ns SYSTEM_RESERVED_NAME
 #define R SYSTEM_RESERVED_NAME
 #define Rp SYSTEM_RESERVED_NAME
 #define Rs SYSTEM_RESERVED_NAME


        


More information about the libcxx-commits mailing list