[cfe-commits] [libcxx] r167038 - in /libcxx/trunk: include/__config include/__functional_base include/__functional_base_03 include/__mutex_base include/condition_variable include/cstddef include/future include/ios include/iterator include/memory include/random include/string include/system_error include/tuple include/type_traits src/memory.cpp

Howard Hinnant hhinnant at apple.com
Tue Oct 30 12:06:59 PDT 2012


Author: hhinnant
Date: Tue Oct 30 14:06:59 2012
New Revision: 167038

URL: http://llvm.org/viewvc/llvm-project?rev=167038&view=rev
Log:
Rename uses of _ and __ because these are getting stepped on by macros from other system code.

Modified:
    libcxx/trunk/include/__config
    libcxx/trunk/include/__functional_base
    libcxx/trunk/include/__functional_base_03
    libcxx/trunk/include/__mutex_base
    libcxx/trunk/include/condition_variable
    libcxx/trunk/include/cstddef
    libcxx/trunk/include/future
    libcxx/trunk/include/ios
    libcxx/trunk/include/iterator
    libcxx/trunk/include/memory
    libcxx/trunk/include/random
    libcxx/trunk/include/string
    libcxx/trunk/include/system_error
    libcxx/trunk/include/tuple
    libcxx/trunk/include/type_traits
    libcxx/trunk/src/memory.cpp

Modified: libcxx/trunk/include/__config
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__config?rev=167038&r1=167037&r2=167038&view=diff
==============================================================================
--- libcxx/trunk/include/__config (original)
+++ libcxx/trunk/include/__config Tue Oct 30 14:06:59 2012
@@ -415,11 +415,11 @@
 #endif
 
 #ifdef _LIBCPP_HAS_NO_STRONG_ENUMS
-#define _LIBCPP_DECLARE_STRONG_ENUM(x) struct _LIBCPP_VISIBLE x { enum _
+#define _LIBCPP_DECLARE_STRONG_ENUM(x) struct _LIBCPP_VISIBLE x { enum __lx
 #define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x) \
-    _ __v_; \
-    _LIBCPP_ALWAYS_INLINE x(_ __v) : __v_(__v) {} \
-    _LIBCPP_ALWAYS_INLINE explicit x(int __v) : __v_(static_cast<_>(__v)) {} \
+    __lx __v_; \
+    _LIBCPP_ALWAYS_INLINE x(__lx __v) : __v_(__v) {} \
+    _LIBCPP_ALWAYS_INLINE explicit x(int __v) : __v_(static_cast<__lx>(__v)) {} \
     _LIBCPP_ALWAYS_INLINE operator int() const {return __v_;} \
     };
 #else  // _LIBCPP_HAS_NO_STRONG_ENUMS

Modified: libcxx/trunk/include/__functional_base
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__functional_base?rev=167038&r1=167037&r2=167038&view=diff
==============================================================================
--- libcxx/trunk/include/__functional_base (original)
+++ libcxx/trunk/include/__functional_base Tue Oct 30 14:06:59 2012
@@ -43,7 +43,7 @@
 struct __has_result_type
 {
 private:
-    struct __two {char _; char __;};
+    struct __two {char __lx; char __lxx;};
     template <class _Up> static __two __test(...);
     template <class _Up> static char __test(typename _Up::result_type* = 0);
 public:
@@ -69,7 +69,7 @@
 struct __derives_from_unary_function
 {
 private:
-    struct __two {char _; char __;};
+    struct __two {char __lx; char __lxx;};
     static __two __test(...);
     template <class _Ap, class _Rp>
         static unary_function<_Ap, _Rp>
@@ -83,7 +83,7 @@
 struct __derives_from_binary_function
 {
 private:
-    struct __two {char _; char __;};
+    struct __two {char __lx; char __lxx;};
     static __two __test(...);
     template <class _A1, class _A2, class _Rp>
         static binary_function<_A1, _A2, _Rp>

Modified: libcxx/trunk/include/__functional_base_03
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__functional_base_03?rev=167038&r1=167037&r2=167038&view=diff
==============================================================================
--- libcxx/trunk/include/__functional_base_03 (original)
+++ libcxx/trunk/include/__functional_base_03 Tue Oct 30 14:06:59 2012
@@ -19,7 +19,7 @@
 struct __derives_from_unary_function
 {
 private:
-    struct __two {char _; char __;};
+    struct __two {char __lx; char __lxx;};
     static __two __test(...);
     template <class _Ap, class _Rp>
         static unary_function<_Ap, _Rp>
@@ -33,7 +33,7 @@
 struct __derives_from_binary_function
 {
 private:
-    struct __two {char _; char __;};
+    struct __two {char __lx; char __lxx;};
     static __two __test(...);
     template <class _A1, class _A2, class _Rp>
         static binary_function<_A1, _A2, _Rp>
@@ -943,7 +943,7 @@
 struct __has_type
 {
 private:
-    struct __two {char _; char __;};
+    struct __two {char __lx; char __lxx;};
     template <class _Up> static __two __test(...);
     template <class _Up> static char __test(typename _Up::type* = 0);
 public:

Modified: libcxx/trunk/include/__mutex_base
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__mutex_base?rev=167038&r1=167037&r2=167038&view=diff
==============================================================================
--- libcxx/trunk/include/__mutex_base (original)
+++ libcxx/trunk/include/__mutex_base Tue Oct 30 14:06:59 2012
@@ -287,14 +287,14 @@
 
 struct _LIBCPP_VISIBLE cv_status
 {
-    enum _ {
+    enum __lx {
         no_timeout,
         timeout
     };
 
-    _ __v_;
+    __lx __v_;
 
-    _LIBCPP_INLINE_VISIBILITY cv_status(_ __v) : __v_(__v) {}
+    _LIBCPP_INLINE_VISIBILITY cv_status(__lx __v) : __v_(__v) {}
     _LIBCPP_INLINE_VISIBILITY operator int() const {return __v_;}
 
 };

Modified: libcxx/trunk/include/condition_variable
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/condition_variable?rev=167038&r1=167037&r2=167038&view=diff
==============================================================================
--- libcxx/trunk/include/condition_variable (original)
+++ libcxx/trunk/include/condition_variable Tue Oct 30 14:06:59 2012
@@ -163,7 +163,7 @@
 void
 condition_variable_any::notify_one() _NOEXCEPT
 {
-    {lock_guard<mutex> _(*__mut_);}
+    {lock_guard<mutex> __lx(*__mut_);}
     __cv_.notify_one();
 }
 
@@ -171,7 +171,7 @@
 void
 condition_variable_any::notify_all() _NOEXCEPT
 {
-    {lock_guard<mutex> _(*__mut_);}
+    {lock_guard<mutex> __lx(*__mut_);}
     __cv_.notify_all();
 }
 
@@ -188,8 +188,8 @@
     shared_ptr<mutex> __mut = __mut_;
     unique_lock<mutex> __lk(*__mut);
     __lock.unlock();
-    unique_ptr<_Lock, __lock_external> __(&__lock);
-    lock_guard<unique_lock<mutex> > _(__lk, adopt_lock);
+    unique_ptr<_Lock, __lock_external> __lxx(&__lock);
+    lock_guard<unique_lock<mutex> > __lx(__lk, adopt_lock);
     __cv_.wait(__lk);
 }  // __mut_.unlock(), __lock.lock()
 
@@ -210,8 +210,8 @@
     shared_ptr<mutex> __mut = __mut_;
     unique_lock<mutex> __lk(*__mut);
     __lock.unlock();
-    unique_ptr<_Lock, __lock_external> __(&__lock);
-    lock_guard<unique_lock<mutex> > _(__lk, adopt_lock);
+    unique_ptr<_Lock, __lock_external> __lxx(&__lock);
+    lock_guard<unique_lock<mutex> > __lx(__lk, adopt_lock);
     return __cv_.wait_until(__lk, __t);
 }  // __mut_.unlock(), __lock.lock()
 

Modified: libcxx/trunk/include/cstddef
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/cstddef?rev=167038&r1=167037&r2=167038&view=diff
==============================================================================
--- libcxx/trunk/include/cstddef (original)
+++ libcxx/trunk/include/cstddef Tue Oct 30 14:06:59 2012
@@ -58,12 +58,12 @@
 
 struct _LIBCPP_VISIBLE nullptr_t
 {
-    void* _;
+    void* __lx;
 
     struct __nat {int __for_bool_;};
 
-    _LIBCPP_ALWAYS_INLINE _LIBCPP_CONSTEXPR nullptr_t() : _(0) {}
-    _LIBCPP_ALWAYS_INLINE _LIBCPP_CONSTEXPR nullptr_t(int __nat::*) : _(0) {}
+    _LIBCPP_ALWAYS_INLINE _LIBCPP_CONSTEXPR nullptr_t() : __lx(0) {}
+    _LIBCPP_ALWAYS_INLINE _LIBCPP_CONSTEXPR nullptr_t(int __nat::*) : __lx(0) {}
 
     _LIBCPP_ALWAYS_INLINE _LIBCPP_CONSTEXPR operator int __nat::*() const {return 0;}
 

Modified: libcxx/trunk/include/future
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/future?rev=167038&r1=167037&r2=167038&view=diff
==============================================================================
--- libcxx/trunk/include/future (original)
+++ libcxx/trunk/include/future Tue Oct 30 14:06:59 2012
@@ -391,7 +391,7 @@
 
 #ifdef _LIBCPP_HAS_NO_STRONG_ENUMS
 template <>
-struct _LIBCPP_VISIBLE is_error_code_enum<future_errc::_> : public true_type { };
+struct _LIBCPP_VISIBLE is_error_code_enum<future_errc::__lx> : public true_type { };
 #endif
 
 //enum class launch

Modified: libcxx/trunk/include/ios
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/ios?rev=167038&r1=167037&r2=167038&view=diff
==============================================================================
--- libcxx/trunk/include/ios (original)
+++ libcxx/trunk/include/ios Tue Oct 30 14:06:59 2012
@@ -384,7 +384,7 @@
 
 #ifdef _LIBCPP_HAS_NO_STRONG_ENUMS
 template <>
-struct _LIBCPP_VISIBLE is_error_code_enum<io_errc::_> : public true_type { };
+struct _LIBCPP_VISIBLE is_error_code_enum<io_errc::__lx> : public true_type { };
 #endif
 
 _LIBCPP_VISIBLE

Modified: libcxx/trunk/include/iterator
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/iterator?rev=167038&r1=167037&r2=167038&view=diff
==============================================================================
--- libcxx/trunk/include/iterator (original)
+++ libcxx/trunk/include/iterator Tue Oct 30 14:06:59 2012
@@ -337,7 +337,7 @@
 struct __has_iterator_category
 {
 private:
-    struct __two {char _; char __;};
+    struct __two {char __lx; char __lxx;};
     template <class _Up> static __two __test(...);
     template <class _Up> static char __test(typename _Up::iterator_category* = 0);
 public:

Modified: libcxx/trunk/include/memory
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/memory?rev=167038&r1=167037&r2=167038&view=diff
==============================================================================
--- libcxx/trunk/include/memory (original)
+++ libcxx/trunk/include/memory Tue Oct 30 14:06:59 2012
@@ -694,7 +694,7 @@
 struct __has_element_type
 {
 private:
-    struct __two {char _; char __;};
+    struct __two {char __lx; char __lxx;};
     template <class _Up> static __two __test(...);
     template <class _Up> static char __test(typename _Up::element_type* = 0);
 public:
@@ -782,7 +782,7 @@
 struct __has_difference_type
 {
 private:
-    struct __two {char _; char __;};
+    struct __two {char __lx; char __lxx;};
     template <class _Up> static __two __test(...);
     template <class _Up> static char __test(typename _Up::difference_type* = 0);
 public:
@@ -805,7 +805,7 @@
 struct __has_rebind
 {
 private:
-    struct __two {char _; char __;};
+    struct __two {char __lx; char __lxx;};
     template <class _Xp> static __two __test(...);
     template <class _Xp> static char __test(typename _Xp::template rebind<_Up>* = 0);
 public:
@@ -998,7 +998,7 @@
 struct __has_const_pointer
 {
 private:
-    struct __two {char _; char __;};
+    struct __two {char __lx; char __lxx;};
     template <class _Up> static __two __test(...);
     template <class _Up> static char __test(typename _Up::const_pointer* = 0);
 public:
@@ -1025,7 +1025,7 @@
 struct __has_void_pointer
 {
 private:
-    struct __two {char _; char __;};
+    struct __two {char __lx; char __lxx;};
     template <class _Up> static __two __test(...);
     template <class _Up> static char __test(typename _Up::void_pointer* = 0);
 public:
@@ -1052,7 +1052,7 @@
 struct __has_const_void_pointer
 {
 private:
-    struct __two {char _; char __;};
+    struct __two {char __lx; char __lxx;};
     template <class _Up> static __two __test(...);
     template <class _Up> static char __test(typename _Up::const_void_pointer* = 0);
 public:
@@ -1095,7 +1095,7 @@
 struct __has_size_type
 {
 private:
-    struct __two {char _; char __;};
+    struct __two {char __lx; char __lxx;};
     template <class _Up> static __two __test(...);
     template <class _Up> static char __test(typename _Up::size_type* = 0);
 public:
@@ -1118,7 +1118,7 @@
 struct __has_propagate_on_container_copy_assignment
 {
 private:
-    struct __two {char _; char __;};
+    struct __two {char __lx; char __lxx;};
     template <class _Up> static __two __test(...);
     template <class _Up> static char __test(typename _Up::propagate_on_container_copy_assignment* = 0);
 public:
@@ -1141,7 +1141,7 @@
 struct __has_propagate_on_container_move_assignment
 {
 private:
-    struct __two {char _; char __;};
+    struct __two {char __lx; char __lxx;};
     template <class _Up> static __two __test(...);
     template <class _Up> static char __test(typename _Up::propagate_on_container_move_assignment* = 0);
 public:
@@ -1164,7 +1164,7 @@
 struct __has_propagate_on_container_swap
 {
 private:
-    struct __two {char _; char __;};
+    struct __two {char __lx; char __lxx;};
     template <class _Up> static __two __test(...);
     template <class _Up> static char __test(typename _Up::propagate_on_container_swap* = 0);
 public:
@@ -1187,7 +1187,7 @@
 struct __has_rebind_other
 {
 private:
-    struct __two {char _; char __;};
+    struct __two {char __lx; char __lxx;};
     template <class _Xp> static __two __test(...);
     template <class _Xp> static char __test(typename _Xp::template rebind<_Up>::other* = 0);
 public:
@@ -5268,7 +5268,7 @@
 
 class __sp_mut
 {
-    void* _;
+    void* __lx;
 public:
     void lock() _NOEXCEPT;
     void unlock() _NOEXCEPT;
@@ -5395,17 +5395,17 @@
 //enum class
 struct _LIBCPP_VISIBLE pointer_safety
 {
-    enum _
+    enum __lx
     {
         relaxed,
         preferred,
         strict
     };
 
-    _ __v_;
+    __lx __v_;
 
     _LIBCPP_INLINE_VISIBILITY
-    pointer_safety(_ __v) : __v_(__v) {}
+    pointer_safety(__lx __v) : __v_(__v) {}
     _LIBCPP_INLINE_VISIBILITY
     operator int() const {return __v_;}
 };

Modified: libcxx/trunk/include/random
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/random?rev=167038&r1=167037&r2=167038&view=diff
==============================================================================
--- libcxx/trunk/include/random (original)
+++ libcxx/trunk/include/random Tue Oct 30 14:06:59 2012
@@ -1991,7 +1991,7 @@
 operator<<(basic_ostream<_CharT, _Traits>& __os,
            const linear_congruential_engine<_UIntType, __a, __c, __m>& __x)
 {
-    __save_flags<_CharT, _Traits> _(__os);
+    __save_flags<_CharT, _Traits> __lx(__os);
     __os.flags(ios_base::dec | ios_base::left);
     __os.fill(__os.widen(' '));
     return __os << __x.__x_;
@@ -2003,7 +2003,7 @@
 operator>>(basic_istream<_CharT, _Traits>& __is,
            linear_congruential_engine<_UIntType, __a, __c, __m>& __x)
 {
-    __save_flags<_CharT, _Traits> _(__is);
+    __save_flags<_CharT, _Traits> __lx(__is);
     __is.flags(ios_base::dec | ios_base::skipws);
     _UIntType __t;
     __is >> __t;
@@ -2377,7 +2377,7 @@
            const mersenne_twister_engine<_UI, _Wp, _Np, _Mp, _Rp, _Ap, _Up, _Dp, _Sp,
                                          _Bp, _Tp, _Cp, _Lp, _Fp>& __x)
 {
-    __save_flags<_CharT, _Traits> _(__os);
+    __save_flags<_CharT, _Traits> __lx(__os);
     __os.flags(ios_base::dec | ios_base::left);
     _CharT __sp = __os.widen(' ');
     __os.fill(__sp);
@@ -2398,7 +2398,7 @@
            mersenne_twister_engine<_UI, _Wp, _Np, _Mp, _Rp, _Ap, _Up, _Dp, _Sp,
                                    _Bp, _Tp, _Cp, _Lp, _Fp>& __x)
 {
-    __save_flags<_CharT, _Traits> _(__is);
+    __save_flags<_CharT, _Traits> __lx(__is);
     __is.flags(ios_base::dec | ios_base::skipws);
     _UI __t[_Np];
     for (size_t __i = 0; __i < _Np; ++__i)
@@ -2684,7 +2684,7 @@
 operator<<(basic_ostream<_CharT, _Traits>& __os,
            const subtract_with_carry_engine<_UI, _Wp, _Sp, _Rp>& __x)
 {
-    __save_flags<_CharT, _Traits> _(__os);
+    __save_flags<_CharT, _Traits> __lx(__os);
     __os.flags(ios_base::dec | ios_base::left);
     _CharT __sp = __os.widen(' ');
     __os.fill(__sp);
@@ -2703,7 +2703,7 @@
 operator>>(basic_istream<_CharT, _Traits>& __is,
            subtract_with_carry_engine<_UI, _Wp, _Sp, _Rp>& __x)
 {
-    __save_flags<_CharT, _Traits> _(__is);
+    __save_flags<_CharT, _Traits> __lx(__is);
     __is.flags(ios_base::dec | ios_base::skipws);
     _UI __t[_Rp+1];
     for (size_t __i = 0; __i < _Rp+1; ++__i)
@@ -2859,7 +2859,7 @@
 operator<<(basic_ostream<_CharT, _Traits>& __os,
            const discard_block_engine<_Eng, _Pp, _Rp>& __x)
 {
-    __save_flags<_CharT, _Traits> _(__os);
+    __save_flags<_CharT, _Traits> __lx(__os);
     __os.flags(ios_base::dec | ios_base::left);
     _CharT __sp = __os.widen(' ');
     __os.fill(__sp);
@@ -2872,7 +2872,7 @@
 operator>>(basic_istream<_CharT, _Traits>& __is,
            discard_block_engine<_Eng, _Pp, _Rp>& __x)
 {
-    __save_flags<_CharT, _Traits> _(__is);
+    __save_flags<_CharT, _Traits> __lx(__is);
     __is.flags(ios_base::dec | ios_base::skipws);
     _Eng __e;
     int __n;
@@ -3340,7 +3340,7 @@
 operator<<(basic_ostream<_CharT, _Traits>& __os,
            const shuffle_order_engine<_Eng, _Kp>& __x)
 {
-    __save_flags<_CharT, _Traits> _(__os);
+    __save_flags<_CharT, _Traits> __lx(__os);
     __os.flags(ios_base::dec | ios_base::left);
     _CharT __sp = __os.widen(' ');
     __os.fill(__sp);
@@ -3357,7 +3357,7 @@
            shuffle_order_engine<_Eng, _Kp>& __x)
 {
     typedef typename shuffle_order_engine<_Eng, _Kp>::result_type result_type;
-    __save_flags<_CharT, _Traits> _(__is);
+    __save_flags<_CharT, _Traits> __lx(__is);
     __is.flags(ios_base::dec | ios_base::skipws);
     _Eng __e;
     result_type _Vp[_Kp+1];
@@ -3561,7 +3561,7 @@
 operator<<(basic_ostream<_CharT, _Traits>& __os,
            const uniform_int_distribution<_IT>& __x)
 {
-    __save_flags<_CharT, _Traits> _(__os);
+    __save_flags<_CharT, _Traits> __lx(__os);
     __os.flags(ios_base::dec | ios_base::left);
     _CharT __sp = __os.widen(' ');
     __os.fill(__sp);
@@ -3576,7 +3576,7 @@
     typedef uniform_int_distribution<_IT> _Eng;
     typedef typename _Eng::result_type result_type;
     typedef typename _Eng::param_type param_type;
-    __save_flags<_CharT, _Traits> _(__is);
+    __save_flags<_CharT, _Traits> __lx(__is);
     __is.flags(ios_base::dec | ios_base::skipws);
     result_type __a;
     result_type __b;
@@ -3682,7 +3682,7 @@
 operator<<(basic_ostream<_CharT, _Traits>& __os,
            const uniform_real_distribution<_RT>& __x)
 {
-    __save_flags<_CharT, _Traits> _(__os);
+    __save_flags<_CharT, _Traits> __lx(__os);
     __os.flags(ios_base::dec | ios_base::left | ios_base::fixed |
                ios_base::scientific);
     _CharT __sp = __os.widen(' ');
@@ -3698,7 +3698,7 @@
     typedef uniform_real_distribution<_RT> _Eng;
     typedef typename _Eng::result_type result_type;
     typedef typename _Eng::param_type param_type;
-    __save_flags<_CharT, _Traits> _(__is);
+    __save_flags<_CharT, _Traits> __lx(__is);
     __is.flags(ios_base::dec | ios_base::skipws);
     result_type __a;
     result_type __b;
@@ -3793,7 +3793,7 @@
 basic_ostream<_CharT, _Traits>&
 operator<<(basic_ostream<_CharT, _Traits>& __os, const bernoulli_distribution& __x)
 {
-    __save_flags<_CharT, _Traits> _(__os);
+    __save_flags<_CharT, _Traits> __lx(__os);
     __os.flags(ios_base::dec | ios_base::left | ios_base::fixed |
                ios_base::scientific);
     _CharT __sp = __os.widen(' ');
@@ -3807,7 +3807,7 @@
 {
     typedef bernoulli_distribution _Eng;
     typedef typename _Eng::param_type param_type;
-    __save_flags<_CharT, _Traits> _(__is);
+    __save_flags<_CharT, _Traits> __lx(__is);
     __is.flags(ios_base::dec | ios_base::skipws);
     double __p;
     __is >> __p;
@@ -3955,7 +3955,7 @@
 operator<<(basic_ostream<_CharT, _Traits>& __os,
            const binomial_distribution<_IntType>& __x)
 {
-    __save_flags<_CharT, _Traits> _(__os);
+    __save_flags<_CharT, _Traits> __lx(__os);
     __os.flags(ios_base::dec | ios_base::left | ios_base::fixed |
                ios_base::scientific);
     _CharT __sp = __os.widen(' ');
@@ -3971,7 +3971,7 @@
     typedef binomial_distribution<_IntType> _Eng;
     typedef typename _Eng::result_type result_type;
     typedef typename _Eng::param_type param_type;
-    __save_flags<_CharT, _Traits> _(__is);
+    __save_flags<_CharT, _Traits> __lx(__is);
     __is.flags(ios_base::dec | ios_base::skipws);
     result_type __t;
     double __p;
@@ -4073,7 +4073,7 @@
 operator<<(basic_ostream<_CharT, _Traits>& __os,
            const exponential_distribution<_RealType>& __x)
 {
-    __save_flags<_CharT, _Traits> _(__os);
+    __save_flags<_CharT, _Traits> __lx(__os);
     __os.flags(ios_base::dec | ios_base::left | ios_base::fixed |
                ios_base::scientific);
     return __os << __x.lambda();
@@ -4087,7 +4087,7 @@
     typedef exponential_distribution<_RealType> _Eng;
     typedef typename _Eng::result_type result_type;
     typedef typename _Eng::param_type param_type;
-    __save_flags<_CharT, _Traits> _(__is);
+    __save_flags<_CharT, _Traits> __lx(__is);
     __is.flags(ios_base::dec | ios_base::skipws);
     result_type __lambda;
     __is >> __lambda;
@@ -4227,7 +4227,7 @@
 operator<<(basic_ostream<_CharT, _Traits>& __os,
            const normal_distribution<_RT>& __x)
 {
-    __save_flags<_CharT, _Traits> _(__os);
+    __save_flags<_CharT, _Traits> __lx(__os);
     __os.flags(ios_base::dec | ios_base::left | ios_base::fixed |
                ios_base::scientific);
     _CharT __sp = __os.widen(' ');
@@ -4246,7 +4246,7 @@
     typedef normal_distribution<_RT> _Eng;
     typedef typename _Eng::result_type result_type;
     typedef typename _Eng::param_type param_type;
-    __save_flags<_CharT, _Traits> _(__is);
+    __save_flags<_CharT, _Traits> __lx(__is);
     __is.flags(ios_base::dec | ios_base::skipws);
     result_type __mean;
     result_type __stddev;
@@ -4598,7 +4598,7 @@
 operator<<(basic_ostream<_CharT, _Traits>& __os,
            const poisson_distribution<_IntType>& __x)
 {
-    __save_flags<_CharT, _Traits> _(__os);
+    __save_flags<_CharT, _Traits> __lx(__os);
     __os.flags(ios_base::dec | ios_base::left | ios_base::fixed |
                ios_base::scientific);
     return __os << __x.mean();
@@ -4611,7 +4611,7 @@
 {
     typedef poisson_distribution<_IntType> _Eng;
     typedef typename _Eng::param_type param_type;
-    __save_flags<_CharT, _Traits> _(__is);
+    __save_flags<_CharT, _Traits> __lx(__is);
     __is.flags(ios_base::dec | ios_base::skipws);
     double __mean;
     __is >> __mean;
@@ -4709,7 +4709,7 @@
 operator<<(basic_ostream<_CharT, _Traits>& __os,
            const weibull_distribution<_RT>& __x)
 {
-    __save_flags<_CharT, _Traits> _(__os);
+    __save_flags<_CharT, _Traits> __lx(__os);
     __os.flags(ios_base::dec | ios_base::left | ios_base::fixed |
                ios_base::scientific);
     _CharT __sp = __os.widen(' ');
@@ -4726,7 +4726,7 @@
     typedef weibull_distribution<_RT> _Eng;
     typedef typename _Eng::result_type result_type;
     typedef typename _Eng::param_type param_type;
-    __save_flags<_CharT, _Traits> _(__is);
+    __save_flags<_CharT, _Traits> __lx(__is);
     __is.flags(ios_base::dec | ios_base::skipws);
     result_type __a;
     result_type __b;
@@ -4828,7 +4828,7 @@
 operator<<(basic_ostream<_CharT, _Traits>& __os,
            const extreme_value_distribution<_RT>& __x)
 {
-    __save_flags<_CharT, _Traits> _(__os);
+    __save_flags<_CharT, _Traits> __lx(__os);
     __os.flags(ios_base::dec | ios_base::left | ios_base::fixed |
                ios_base::scientific);
     _CharT __sp = __os.widen(' ');
@@ -4845,7 +4845,7 @@
     typedef extreme_value_distribution<_RT> _Eng;
     typedef typename _Eng::result_type result_type;
     typedef typename _Eng::param_type param_type;
-    __save_flags<_CharT, _Traits> _(__is);
+    __save_flags<_CharT, _Traits> __lx(__is);
     __is.flags(ios_base::dec | ios_base::skipws);
     result_type __a;
     result_type __b;
@@ -5000,7 +5000,7 @@
 operator<<(basic_ostream<_CharT, _Traits>& __os,
            const gamma_distribution<_RT>& __x)
 {
-    __save_flags<_CharT, _Traits> _(__os);
+    __save_flags<_CharT, _Traits> __lx(__os);
     __os.flags(ios_base::dec | ios_base::left | ios_base::fixed |
                ios_base::scientific);
     _CharT __sp = __os.widen(' ');
@@ -5017,7 +5017,7 @@
     typedef gamma_distribution<_RT> _Eng;
     typedef typename _Eng::result_type result_type;
     typedef typename _Eng::param_type param_type;
-    __save_flags<_CharT, _Traits> _(__is);
+    __save_flags<_CharT, _Traits> __lx(__is);
     __is.flags(ios_base::dec | ios_base::skipws);
     result_type __alpha;
     result_type __beta;
@@ -5136,7 +5136,7 @@
 operator<<(basic_ostream<_CharT, _Traits>& __os,
            const negative_binomial_distribution<_IntType>& __x)
 {
-    __save_flags<_CharT, _Traits> _(__os);
+    __save_flags<_CharT, _Traits> __lx(__os);
     __os.flags(ios_base::dec | ios_base::left | ios_base::fixed |
                ios_base::scientific);
     _CharT __sp = __os.widen(' ');
@@ -5152,7 +5152,7 @@
     typedef negative_binomial_distribution<_IntType> _Eng;
     typedef typename _Eng::result_type result_type;
     typedef typename _Eng::param_type param_type;
-    __save_flags<_CharT, _Traits> _(__is);
+    __save_flags<_CharT, _Traits> __lx(__is);
     __is.flags(ios_base::dec | ios_base::skipws);
     result_type __k;
     double __p;
@@ -5242,7 +5242,7 @@
 operator<<(basic_ostream<_CharT, _Traits>& __os,
            const geometric_distribution<_IntType>& __x)
 {
-    __save_flags<_CharT, _Traits> _(__os);
+    __save_flags<_CharT, _Traits> __lx(__os);
     __os.flags(ios_base::dec | ios_base::left | ios_base::fixed |
                ios_base::scientific);
     return __os << __x.p();
@@ -5255,7 +5255,7 @@
 {
     typedef geometric_distribution<_IntType> _Eng;
     typedef typename _Eng::param_type param_type;
-    __save_flags<_CharT, _Traits> _(__is);
+    __save_flags<_CharT, _Traits> __lx(__is);
     __is.flags(ios_base::dec | ios_base::skipws);
     double __p;
     __is >> __p;
@@ -5346,7 +5346,7 @@
 operator<<(basic_ostream<_CharT, _Traits>& __os,
            const chi_squared_distribution<_RT>& __x)
 {
-    __save_flags<_CharT, _Traits> _(__os);
+    __save_flags<_CharT, _Traits> __lx(__os);
     __os.flags(ios_base::dec | ios_base::left | ios_base::fixed |
                ios_base::scientific);
     __os << __x.n();
@@ -5361,7 +5361,7 @@
     typedef chi_squared_distribution<_RT> _Eng;
     typedef typename _Eng::result_type result_type;
     typedef typename _Eng::param_type param_type;
-    __save_flags<_CharT, _Traits> _(__is);
+    __save_flags<_CharT, _Traits> __lx(__is);
     __is.flags(ios_base::dec | ios_base::skipws);
     result_type __n;
     __is >> __n;
@@ -5466,7 +5466,7 @@
 operator<<(basic_ostream<_CharT, _Traits>& __os,
            const cauchy_distribution<_RT>& __x)
 {
-    __save_flags<_CharT, _Traits> _(__os);
+    __save_flags<_CharT, _Traits> __lx(__os);
     __os.flags(ios_base::dec | ios_base::left | ios_base::fixed |
                ios_base::scientific);
     _CharT __sp = __os.widen(' ');
@@ -5483,7 +5483,7 @@
     typedef cauchy_distribution<_RT> _Eng;
     typedef typename _Eng::result_type result_type;
     typedef typename _Eng::param_type param_type;
-    __save_flags<_CharT, _Traits> _(__is);
+    __save_flags<_CharT, _Traits> __lx(__is);
     __is.flags(ios_base::dec | ios_base::skipws);
     result_type __a;
     result_type __b;
@@ -5588,7 +5588,7 @@
 operator<<(basic_ostream<_CharT, _Traits>& __os,
            const fisher_f_distribution<_RT>& __x)
 {
-    __save_flags<_CharT, _Traits> _(__os);
+    __save_flags<_CharT, _Traits> __lx(__os);
     __os.flags(ios_base::dec | ios_base::left | ios_base::fixed |
                ios_base::scientific);
     _CharT __sp = __os.widen(' ');
@@ -5605,7 +5605,7 @@
     typedef fisher_f_distribution<_RT> _Eng;
     typedef typename _Eng::result_type result_type;
     typedef typename _Eng::param_type param_type;
-    __save_flags<_CharT, _Traits> _(__is);
+    __save_flags<_CharT, _Traits> __lx(__is);
     __is.flags(ios_base::dec | ios_base::skipws);
     result_type __m;
     result_type __n;
@@ -5704,7 +5704,7 @@
 operator<<(basic_ostream<_CharT, _Traits>& __os,
            const student_t_distribution<_RT>& __x)
 {
-    __save_flags<_CharT, _Traits> _(__os);
+    __save_flags<_CharT, _Traits> __lx(__os);
     __os.flags(ios_base::dec | ios_base::left | ios_base::fixed |
                ios_base::scientific);
     __os << __x.n();
@@ -5719,7 +5719,7 @@
     typedef student_t_distribution<_RT> _Eng;
     typedef typename _Eng::result_type result_type;
     typedef typename _Eng::param_type param_type;
-    __save_flags<_CharT, _Traits> _(__is);
+    __save_flags<_CharT, _Traits> __lx(__is);
     __is.flags(ios_base::dec | ios_base::skipws);
     result_type __n;
     __is >> __n;
@@ -5927,7 +5927,7 @@
 operator<<(basic_ostream<_CharT, _Traits>& __os,
            const discrete_distribution<_IT>& __x)
 {
-    __save_flags<_CharT, _Traits> _(__os);
+    __save_flags<_CharT, _Traits> __lx(__os);
     __os.flags(ios_base::dec | ios_base::left | ios_base::fixed |
                ios_base::scientific);
     _CharT __sp = __os.widen(' ');
@@ -5947,7 +5947,7 @@
     typedef discrete_distribution<_IT> _Eng;
     typedef typename _Eng::result_type result_type;
     typedef typename _Eng::param_type param_type;
-    __save_flags<_CharT, _Traits> _(__is);
+    __save_flags<_CharT, _Traits> __lx(__is);
     __is.flags(ios_base::dec | ios_base::skipws);
     size_t __n;
     __is >> __n;
@@ -6231,7 +6231,7 @@
 operator<<(basic_ostream<_CharT, _Traits>& __os,
            const piecewise_constant_distribution<_RT>& __x)
 {
-    __save_flags<_CharT, _Traits> _(__os);
+    __save_flags<_CharT, _Traits> __lx(__os);
     __os.flags(ios_base::dec | ios_base::left | ios_base::fixed |
                ios_base::scientific);
     _CharT __sp = __os.widen(' ');
@@ -6259,7 +6259,7 @@
     typedef piecewise_constant_distribution<_RT> _Eng;
     typedef typename _Eng::result_type result_type;
     typedef typename _Eng::param_type param_type;
-    __save_flags<_CharT, _Traits> _(__is);
+    __save_flags<_CharT, _Traits> __lx(__is);
     __is.flags(ios_base::dec | ios_base::skipws);
     size_t __n;
     __is >> __n;
@@ -6571,7 +6571,7 @@
 operator<<(basic_ostream<_CharT, _Traits>& __os,
            const piecewise_linear_distribution<_RT>& __x)
 {
-    __save_flags<_CharT, _Traits> _(__os);
+    __save_flags<_CharT, _Traits> __lx(__os);
     __os.flags(ios_base::dec | ios_base::left | ios_base::fixed |
                ios_base::scientific);
     _CharT __sp = __os.widen(' ');
@@ -6599,7 +6599,7 @@
     typedef piecewise_linear_distribution<_RT> _Eng;
     typedef typename _Eng::result_type result_type;
     typedef typename _Eng::param_type param_type;
-    __save_flags<_CharT, _Traits> _(__is);
+    __save_flags<_CharT, _Traits> __lx(__is);
     __is.flags(ios_base::dec | ios_base::skipws);
     size_t __n;
     __is >> __n;

Modified: libcxx/trunk/include/string
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/string?rev=167038&r1=167037&r2=167038&view=diff
==============================================================================
--- libcxx/trunk/include/string (original)
+++ libcxx/trunk/include/string Tue Oct 30 14:06:59 2012
@@ -1094,14 +1094,14 @@
         union
         {
             unsigned char __size_;
-            value_type _;
+            value_type __lx;
         };
         value_type __data_[__min_cap];
     };
 
-    union _{__long _; __short __;};
+    union __lx{__long __lx; __short __lxx;};
 
-    enum {__n_words = sizeof(_) / sizeof(size_type)};
+    enum {__n_words = sizeof(__lx) / sizeof(size_type)};
 
     struct __raw
     {

Modified: libcxx/trunk/include/system_error
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/system_error?rev=167038&r1=167037&r2=167038&view=diff
==============================================================================
--- libcxx/trunk/include/system_error (original)
+++ libcxx/trunk/include/system_error Tue Oct 30 14:06:59 2012
@@ -350,7 +350,7 @@
 
 #ifdef _LIBCPP_HAS_NO_STRONG_ENUMS
 template <>
-struct _LIBCPP_VISIBLE is_error_condition_enum<errc::_>
+struct _LIBCPP_VISIBLE is_error_condition_enum<errc::__lx>
     : true_type { };
 #endif
 

Modified: libcxx/trunk/include/tuple
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/tuple?rev=167038&r1=167037&r2=167038&view=diff
==============================================================================
--- libcxx/trunk/include/tuple (original)
+++ libcxx/trunk/include/tuple Tue Oct 30 14:06:59 2012
@@ -142,7 +142,7 @@
 struct __has_allocator_type
 {
 private:
-    struct __two {char _; char __;};
+    struct __two {char __lx; char __lxx;};
     template <class _Up> static __two __test(...);
     template <class _Up> static char __test(typename _Up::allocator_type* = 0);
 public:

Modified: libcxx/trunk/include/type_traits
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/type_traits?rev=167038&r1=167037&r2=167038&view=diff
==============================================================================
--- libcxx/trunk/include/type_traits (original)
+++ libcxx/trunk/include/type_traits Tue Oct 30 14:06:59 2012
@@ -156,7 +156,7 @@
 template <bool, class _Tp = void> struct _LIBCPP_VISIBLE enable_if {};
 template <class _Tp> struct _LIBCPP_VISIBLE enable_if<true, _Tp> {typedef _Tp type;};
 
-struct __two {char _[2];};
+struct __two {char __lx[2];};
 
 // helper class:
 
@@ -754,12 +754,12 @@
 struct __is_empty1
     : public _Tp
 {
-    double _;
+    double __lx;
 };
 
 struct __is_empty2
 {
-    double _;
+    double __lx;
 };
 
 template <class _Tp, bool = is_class<_Tp>::value>
@@ -811,7 +811,7 @@
 
 // alignment_of
 
-template <class _Tp> struct __alignment_of {_Tp _;};
+template <class _Tp> struct __alignment_of {_Tp __lx;};
 
 template <class _Tp> struct _LIBCPP_VISIBLE alignment_of
     : public integral_constant<size_t, __alignof__(__alignment_of<typename remove_all_extents<_Tp>::type>)> {};
@@ -842,8 +842,8 @@
     typedef _Tp type;
 };
 
-struct __struct_double {long double _;};
-struct __struct_double4 {double _[4];};
+struct __struct_double {long double __lx;};
+struct __struct_double4 {double __lx[4];};
 
 typedef
     __type_list<__align_type<unsigned char>,
@@ -918,7 +918,7 @@
 {\
     struct _ALIGNAS(n) type\
     {\
-        unsigned char _[_Len];\
+        unsigned char __lx[_Len];\
     };\
 }
 
@@ -1809,15 +1809,15 @@
 template <class _Tp>
 struct __is_constructible_ref
 {
-    true_type static __(_Tp);
-    false_type static __(...);
+    true_type static __lxx(_Tp);
+    false_type static __lxx(...);
 };
 
 template <class _Tp, class _A0>
 struct __is_constructible<true, _Tp, _A0>
     : public common_type
              <
-                 decltype(__is_constructible_ref<_Tp>::__(declval<_A0>()))
+                 decltype(__is_constructible_ref<_Tp>::__lxx(declval<_A0>()))
              >::type
     {};
 

Modified: libcxx/trunk/src/memory.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/memory.cpp?rev=167038&r1=167037&r2=167038&view=diff
==============================================================================
--- libcxx/trunk/src/memory.cpp (original)
+++ libcxx/trunk/src/memory.cpp Tue Oct 30 14:06:59 2012
@@ -125,14 +125,14 @@
 static mutex mut_back[__sp_mut_count];
 
 _LIBCPP_CONSTEXPR __sp_mut::__sp_mut(void* p) _NOEXCEPT
-   : _(p)
+   : __lx(p)
 {
 }
 
 void
 __sp_mut::lock() _NOEXCEPT
 {
-    mutex& m = *static_cast<mutex*>(_);
+    mutex& m = *static_cast<mutex*>(__lx);
     unsigned count = 0;
     while (!m.try_lock())
     {
@@ -148,7 +148,7 @@
 void
 __sp_mut::unlock() _NOEXCEPT
 {
-    static_cast<mutex*>(_)->unlock();
+    static_cast<mutex*>(__lx)->unlock();
 }
 
 __sp_mut&





More information about the cfe-commits mailing list