[PATCH] D24991: Inline hot functions in libcxx shared_ptr implementation.
Marshall Clow via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 16 08:31:50 PST 2017
mclow.lists added inline comments.
================
Comment at: libcxx/include/memory:3700
+
+template <class T>
+inline T
----------------
`template <class _Tp>`, please.
Otherwise when some client code does `#define T true` (yes, I've seen that!) this breaks. `_Tp` is a reserved identifier, and if they use that, we can point at them and laugh.
================
Comment at: libcxx/include/memory:3702
+inline T
+__libcpp_atomic_refcount_increment(T& t) _NOEXCEPT
+{
----------------
The parameter name needs to be reserved as well. `__t`, please.
================
Comment at: libcxx/include/memory:3711
+
+template <class T>
+inline T
----------------
Same comment as L3700
================
Comment at: libcxx/include/memory:3713
+inline T
+__libcpp_atomic_refcount_decrement(T& t) _NOEXCEPT
+{
----------------
Same comment as L3702
Repository:
rL LLVM
https://reviews.llvm.org/D24991
More information about the cfe-commits
mailing list