Update clang to r339409b.

Change-Id: Ied8a188bb072c40035320acedc86164b66d920af
diff --git a/linux-x64/clang/include/c++/v1/__bit_reference b/linux-x64/clang/include/c++/v1/__bit_reference
index 3e4a21d..c208af2 100644
--- a/linux-x64/clang/include/c++/v1/__bit_reference
+++ b/linux-x64/clang/include/c++/v1/__bit_reference
@@ -12,6 +12,7 @@
 #define _LIBCPP___BIT_REFERENCE
 
 #include <__config>
+#include <bit>
 #include <algorithm>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -254,18 +255,18 @@
         __storage_type __clz_f = static_cast<__storage_type>(__bits_per_word - __first.__ctz_);
         __storage_type __dn = _VSTD::min(__clz_f, __n);
         __storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __dn));
-        __r = _VSTD::__pop_count(*__first.__seg_ & __m);
+        __r = _VSTD::__popcount(*__first.__seg_ & __m);
         __n -= __dn;
         ++__first.__seg_;
     }
     // do middle whole words
     for (; __n >= __bits_per_word; ++__first.__seg_, __n -= __bits_per_word)
-        __r += _VSTD::__pop_count(*__first.__seg_);
+        __r += _VSTD::__popcount(*__first.__seg_);
     // do last partial word
     if (__n > 0)
     {
         __storage_type __m = ~__storage_type(0) >> (__bits_per_word - __n);
-        __r += _VSTD::__pop_count(*__first.__seg_ & __m);
+        __r += _VSTD::__popcount(*__first.__seg_ & __m);
     }
     return __r;
 }
@@ -285,18 +286,18 @@
         __storage_type __clz_f = static_cast<__storage_type>(__bits_per_word - __first.__ctz_);
         __storage_type __dn = _VSTD::min(__clz_f, __n);
         __storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __dn));
-        __r = _VSTD::__pop_count(~*__first.__seg_ & __m);
+        __r = _VSTD::__popcount(~*__first.__seg_ & __m);
         __n -= __dn;
         ++__first.__seg_;
     }
     // do middle whole words
     for (; __n >= __bits_per_word; ++__first.__seg_, __n -= __bits_per_word)
-        __r += _VSTD::__pop_count(~*__first.__seg_);
+        __r += _VSTD::__popcount(~*__first.__seg_);
     // do last partial word
     if (__n > 0)
     {
         __storage_type __m = ~__storage_type(0) >> (__bits_per_word - __n);
-        __r += _VSTD::__pop_count(~*__first.__seg_ & __m);
+        __r += _VSTD::__popcount(~*__first.__seg_ & __m);
     }
     return __r;
 }
diff --git a/linux-x64/clang/include/c++/v1/__config b/linux-x64/clang/include/c++/v1/__config
index 0f8f5a8..bababbc 100644
--- a/linux-x64/clang/include/c++/v1/__config
+++ b/linux-x64/clang/include/c++/v1/__config
@@ -36,11 +36,7 @@
 #define _LIBCPP_VERSION 8000
 
 #ifndef _LIBCPP_ABI_VERSION
-#  ifdef __Fuchsia__
-#    define _LIBCPP_ABI_VERSION 2
-#  else
-#    define _LIBCPP_ABI_VERSION 1
-#  endif
+#  define _LIBCPP_ABI_VERSION 1
 #endif
 
 #ifndef _LIBCPP_STD_VER
@@ -328,6 +324,31 @@
 #  define _LIBCPP_NO_CFI
 #endif
 
+#if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L
+#  if defined(__FreeBSD__)
+#    define _LIBCPP_HAS_QUICK_EXIT
+#    define _LIBCPP_HAS_C11_FEATURES
+#  elif defined(__Fuchsia__)
+#    define _LIBCPP_HAS_QUICK_EXIT
+#    define _LIBCPP_HAS_TIMESPEC_GET
+#    define _LIBCPP_HAS_C11_FEATURES
+#  elif defined(__linux__)
+#    if !defined(_LIBCPP_HAS_MUSL_LIBC)
+#      if _LIBCPP_GLIBC_PREREQ(2, 15) || defined(__BIONIC__)
+#        define _LIBCPP_HAS_QUICK_EXIT
+#      endif
+#      if _LIBCPP_GLIBC_PREREQ(2, 17)
+#        define _LIBCPP_HAS_C11_FEATURES
+#        define _LIBCPP_HAS_TIMESPEC_GET
+#      endif
+#    else // defined(_LIBCPP_HAS_MUSL_LIBC)
+#      define _LIBCPP_HAS_QUICK_EXIT
+#      define _LIBCPP_HAS_TIMESPEC_GET
+#      define _LIBCPP_HAS_C11_FEATURES
+#    endif
+#  endif // __linux__
+#endif
+
 #if defined(_LIBCPP_COMPILER_CLANG)
 
 // _LIBCPP_ALTERNATE_STRING_LAYOUT is an old name for
@@ -430,28 +451,6 @@
 #define _LIBCPP_HAS_NO_VARIABLE_TEMPLATES
 #endif
 
-#if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L
-#  if defined(__FreeBSD__)
-#    define _LIBCPP_HAS_QUICK_EXIT
-#    define _LIBCPP_HAS_C11_FEATURES
-#  elif defined(__Fuchsia__)
-#    define _LIBCPP_HAS_QUICK_EXIT
-#    define _LIBCPP_HAS_C11_FEATURES
-#  elif defined(__linux__)
-#    if !defined(_LIBCPP_HAS_MUSL_LIBC)
-#      if _LIBCPP_GLIBC_PREREQ(2, 15) || defined(__BIONIC__)
-#        define _LIBCPP_HAS_QUICK_EXIT
-#      endif
-#      if _LIBCPP_GLIBC_PREREQ(2, 17)
-#        define _LIBCPP_HAS_C11_FEATURES
-#      endif
-#    else // defined(_LIBCPP_HAS_MUSL_LIBC)
-#      define _LIBCPP_HAS_QUICK_EXIT
-#      define _LIBCPP_HAS_C11_FEATURES
-#    endif
-#  endif // __linux__
-#endif
-
 #if !(__has_feature(cxx_noexcept))
 #define _LIBCPP_HAS_NO_NOEXCEPT
 #endif
@@ -795,8 +794,20 @@
 #  define _LIBCPP_INTERNAL_LINKAGE _LIBCPP_ALWAYS_INLINE
 #endif
 
+#ifndef _LIBCPP_HIDE_FROM_ABI_PER_TU
+#  ifndef _LIBCPP_HIDE_FROM_ABI_PER_TU_BY_DEFAULT
+#    define _LIBCPP_HIDE_FROM_ABI_PER_TU 0
+#  else
+#    define _LIBCPP_HIDE_FROM_ABI_PER_TU 1
+#  endif
+#endif
+
 #ifndef _LIBCPP_HIDE_FROM_ABI
-#  define _LIBCPP_HIDE_FROM_ABI _LIBCPP_HIDDEN _LIBCPP_INTERNAL_LINKAGE
+#  if _LIBCPP_HIDE_FROM_ABI_PER_TU
+#    define _LIBCPP_HIDE_FROM_ABI _LIBCPP_HIDDEN _LIBCPP_INTERNAL_LINKAGE
+#  else
+#    define _LIBCPP_HIDE_FROM_ABI _LIBCPP_HIDDEN _LIBCPP_ALWAYS_INLINE
+#  endif
 #endif
 
 #ifdef _LIBCPP_BUILDING_LIBRARY
@@ -988,6 +999,11 @@
 #  endif
 #endif // defined(__APPLE__)
 
+#if !defined(_LIBCPP_HAS_NO_ALIGNED_ALLOCATION) && \
+    !defined(_LIBCPP_BUILDING_LIBRARY) && \
+    (!defined(__cpp_aligned_new) || __cpp_aligned_new < 201606)
+#  define _LIBCPP_HAS_NO_ALIGNED_ALLOCATION
+#endif
 
 #if defined(__APPLE__) || defined(__FreeBSD__)
 #define _LIBCPP_HAS_DEFAULTRUNELOCALE
@@ -997,18 +1013,42 @@
 #define _LIBCPP_WCTYPE_IS_MASK
 #endif
 
-#if _LIBCPP_STD_VER > 11
-#  define _LIBCPP_DEPRECATED [[deprecated]]
+// Deprecation macros.
+// Deprecations warnings are only enabled when _LIBCPP_ENABLE_DEPRECATION_WARNINGS is defined.
+#if defined(_LIBCPP_ENABLE_DEPRECATION_WARNINGS)
+#  if __has_attribute(deprecated)
+#    define _LIBCPP_DEPRECATED __attribute__ ((deprecated))
+#  elif _LIBCPP_STD_VER > 11
+#    define _LIBCPP_DEPRECATED [[deprecated]]
+#  else
+#    define _LIBCPP_DEPRECATED
+#  endif
 #else
 #  define _LIBCPP_DEPRECATED
 #endif
 
+#if !defined(_LIBCPP_CXX03_LANG)
+#  define _LIBCPP_DEPRECATED_IN_CXX11 _LIBCPP_DEPRECATED
+#else
+#  define _LIBCPP_DEPRECATED_IN_CXX11
+#endif
+
+#if _LIBCPP_STD_VER >= 14
+#  define _LIBCPP_DEPRECATED_IN_CXX14 _LIBCPP_DEPRECATED
+#else
+#  define _LIBCPP_DEPRECATED_IN_CXX14
+#endif
+
+#if _LIBCPP_STD_VER >= 17
+#  define _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_DEPRECATED
+#else
+#  define _LIBCPP_DEPRECATED_IN_CXX17
+#endif
+
 #if _LIBCPP_STD_VER <= 11
 #  define _LIBCPP_EXPLICIT_AFTER_CXX11
-#  define _LIBCPP_DEPRECATED_AFTER_CXX11
 #else
 #  define _LIBCPP_EXPLICIT_AFTER_CXX11 explicit
-#  define _LIBCPP_DEPRECATED_AFTER_CXX11 [[deprecated]]
 #endif
 
 #if _LIBCPP_STD_VER > 11 && !defined(_LIBCPP_HAS_NO_CXX14_CONSTEXPR)
@@ -1029,8 +1069,30 @@
 #  define _LIBCPP_CONSTEXPR_AFTER_CXX17
 #endif
 
-#if __has_cpp_attribute(nodiscard) && _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_DISABLE_NODISCARD_AFTER_CXX17)
-#  define _LIBCPP_NODISCARD_AFTER_CXX17 [[nodiscard]]
+// The _LIBCPP_NODISCARD_ATTRIBUTE should only be used to define other
+// NODISCARD macros to the correct attribute.
+#if __has_cpp_attribute(nodiscard) || defined(_LIBCPP_COMPILER_MSVC)
+#  define _LIBCPP_NODISCARD_ATTRIBUTE [[nodiscard]]
+#elif defined(_LIBCPP_COMPILER_CLANG) && !defined(_LIBCPP_CXX03_LANG)
+#  define _LIBCPP_NODISCARD_ATTRIBUTE [[clang::warn_unused_result]]
+#else
+// We can't use GCC's [[gnu::warn_unused_result]] and
+// __attribute__((warn_unused_result)), because GCC does not silence them via
+// (void) cast.
+#  define _LIBCPP_NODISCARD_ATTRIBUTE
+#endif
+
+// _LIBCPP_NODISCARD_EXT may be used to apply [[nodiscard]] to entities not
+// specified as such as an extension.
+#if defined(_LIBCPP_ENABLE_NODISCARD) && !defined(_LIBCPP_DISABLE_NODISCARD_EXT)
+#  define _LIBCPP_NODISCARD_EXT _LIBCPP_NODISCARD_ATTRIBUTE
+#else
+#  define _LIBCPP_NODISCARD_EXT
+#endif
+
+#if !defined(_LIBCPP_DISABLE_NODISCARD_AFTER_CXX17) && \
+    (_LIBCPP_STD_VER > 17 || defined(_LIBCPP_ENABLE_NODISCARD))
+#  define _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_NODISCARD_ATTRIBUTE
 #else
 #  define _LIBCPP_NODISCARD_AFTER_CXX17
 #endif
diff --git a/linux-x64/clang/include/c++/v1/__functional_base b/linux-x64/clang/include/c++/v1/__functional_base
index 57fdf2b..1887974 100644
--- a/linux-x64/clang/include/c++/v1/__functional_base
+++ b/linux-x64/clang/include/c++/v1/__functional_base
@@ -50,7 +50,7 @@
 #endif
 struct _LIBCPP_TEMPLATE_VIS less : binary_function<_Tp, _Tp, bool>
 {
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY 
+    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
     bool operator()(const _Tp& __x, const _Tp& __y) const
         {return __x < __y;}
 };
@@ -59,7 +59,7 @@
 template <>
 struct _LIBCPP_TEMPLATE_VIS less<void>
 {
-    template <class _T1, class _T2> 
+    template <class _T1, class _T2>
     _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
     auto operator()(_T1&& __t, _T2&& __u) const
     _NOEXCEPT_(noexcept(_VSTD::forward<_T1>(__t) < _VSTD::forward<_T2>(__u)))
@@ -552,7 +552,7 @@
 struct __is_transparent : false_type {};
 
 template <class _Tp, class _Up>
-struct __is_transparent<_Tp, _Up,  
+struct __is_transparent<_Tp, _Up,
                         typename __void_t<typename _Tp::is_transparent>::type>
    : true_type {};
 #endif
diff --git a/linux-x64/clang/include/c++/v1/__node_handle b/linux-x64/clang/include/c++/v1/__node_handle
index fe09f3c..567f8b0 100644
--- a/linux-x64/clang/include/c++/v1/__node_handle
+++ b/linux-x64/clang/include/c++/v1/__node_handle
@@ -26,7 +26,8 @@
 
 #if _LIBCPP_STD_VER > 14
 
-#define __cpp_lib_node_extract 201606L
+// FIXME: Uncomment this when we support the 'merge' functionality.
+// #define __cpp_lib_node_extract 201606L
 
 // Specialized in __tree & __hash_table for their _NodeType.
 template <class _NodeType, class _Alloc>
diff --git a/linux-x64/clang/include/c++/v1/__threading_support b/linux-x64/clang/include/c++/v1/__threading_support
index 3c1eff2..2024900 100644
--- a/linux-x64/clang/include/c++/v1/__threading_support
+++ b/linux-x64/clang/include/c++/v1/__threading_support
@@ -70,7 +70,7 @@
 
 typedef pthread_t __libcpp_thread_t;
 
-// Thrad Local Storage
+// Thread Local Storage
 typedef pthread_key_t __libcpp_tls_key;
 
 #define _LIBCPP_TLS_DESTRUCTOR_CC
diff --git a/linux-x64/clang/include/c++/v1/algorithm b/linux-x64/clang/include/c++/v1/algorithm
index 90f1d24..9ce6aa0 100644
--- a/linux-x64/clang/include/c++/v1/algorithm
+++ b/linux-x64/clang/include/c++/v1/algorithm
@@ -645,13 +645,8 @@
 #include <functional>
 #include <iterator>
 #include <cstddef>
-
-#if defined(__IBMCPP__)
-#include "support/ibm/support.h"
-#endif
-#if defined(_LIBCPP_COMPILER_MSVC)
-#include <intrin.h>
-#endif
+#include <bit>
+#include <version>
 
 #include <__debug>
 
@@ -788,135 +783,6 @@
 
 #endif  // _LIBCPP_DEBUG
 
-// Precondition:  __x != 0
-inline _LIBCPP_INLINE_VISIBILITY
-unsigned __ctz(unsigned __x) {
-#ifndef _LIBCPP_COMPILER_MSVC
-    return static_cast<unsigned>(__builtin_ctz(__x));
-#else
-  static_assert(sizeof(unsigned) == sizeof(unsigned long), "");
-  static_assert(sizeof(unsigned long) == 4, "");
-  unsigned long where;
-  // Search from LSB to MSB for first set bit.
-  // Returns zero if no set bit is found.
-  if (_BitScanForward(&where, __x))
-    return where;
-  return 32;
-#endif
-}
-
-inline _LIBCPP_INLINE_VISIBILITY
-unsigned long __ctz(unsigned long __x) {
-#ifndef _LIBCPP_COMPILER_MSVC
-    return static_cast<unsigned long>(__builtin_ctzl(__x));
-#else
-    static_assert(sizeof(unsigned long) == sizeof(unsigned), "");
-    return __ctz(static_cast<unsigned>(__x));
-#endif
-}
-
-inline _LIBCPP_INLINE_VISIBILITY
-unsigned long long __ctz(unsigned long long __x) {
-#ifndef _LIBCPP_COMPILER_MSVC
-    return static_cast<unsigned long long>(__builtin_ctzll(__x));
-#else
-    unsigned long where;
-// Search from LSB to MSB for first set bit.
-// Returns zero if no set bit is found.
-#if defined(_LIBCPP_HAS_BITSCAN64)
-    (defined(_M_AMD64) || defined(__x86_64__))
-  if (_BitScanForward64(&where, __x))
-    return static_cast<int>(where);
-#else
-  // Win32 doesn't have _BitScanForward64 so emulate it with two 32 bit calls.
-  // Scan the Low Word.
-  if (_BitScanForward(&where, static_cast<unsigned long>(__x)))
-    return where;
-  // Scan the High Word.
-  if (_BitScanForward(&where, static_cast<unsigned long>(__x >> 32)))
-    return where + 32; // Create a bit offset from the LSB.
-#endif
-  return 64;
-#endif // _LIBCPP_COMPILER_MSVC
-}
-
-// Precondition:  __x != 0
-inline _LIBCPP_INLINE_VISIBILITY
-unsigned __clz(unsigned __x) {
-#ifndef _LIBCPP_COMPILER_MSVC
-    return static_cast<unsigned>(__builtin_clz(__x));
-#else
-  static_assert(sizeof(unsigned) == sizeof(unsigned long), "");
-  static_assert(sizeof(unsigned long) == 4, "");
-  unsigned long where;
-  // Search from LSB to MSB for first set bit.
-  // Returns zero if no set bit is found.
-  if (_BitScanReverse(&where, __x))
-    return 31 - where;
-  return 32; // Undefined Behavior.
-#endif
-}
-
-inline _LIBCPP_INLINE_VISIBILITY
-unsigned long __clz(unsigned long __x) {
-#ifndef _LIBCPP_COMPILER_MSVC
-    return static_cast<unsigned long>(__builtin_clzl (__x));
-#else
-    static_assert(sizeof(unsigned) == sizeof(unsigned long), "");
-    return __clz(static_cast<unsigned>(__x));
-#endif
-}
-
-inline _LIBCPP_INLINE_VISIBILITY
-unsigned long long __clz(unsigned long long __x) {
-#ifndef _LIBCPP_COMPILER_MSVC
-    return static_cast<unsigned long long>(__builtin_clzll(__x));
-#else
-  unsigned long where;
-// BitScanReverse scans from MSB to LSB for first set bit.
-// Returns 0 if no set bit is found.
-#if defined(_LIBCPP_HAS_BITSCAN64)
-  if (_BitScanReverse64(&where, __x))
-    return static_cast<int>(63 - where);
-#else
-  // Scan the high 32 bits.
-  if (_BitScanReverse(&where, static_cast<unsigned long>(__x >> 32)))
-    return 63 - (where + 32); // Create a bit offset from the MSB.
-  // Scan the low 32 bits.
-  if (_BitScanReverse(&where, static_cast<unsigned long>(__x)))
-    return 63 - where;
-#endif
-  return 64; // Undefined Behavior.
-#endif // _LIBCPP_COMPILER_MSVC
-}
-
-inline _LIBCPP_INLINE_VISIBILITY int __pop_count(unsigned __x) {
-#ifndef _LIBCPP_COMPILER_MSVC
-  return __builtin_popcount  (__x);
-#else
-  static_assert(sizeof(unsigned) == 4, "");
-  return __popcnt(__x);
-#endif
-}
-
-inline _LIBCPP_INLINE_VISIBILITY int __pop_count(unsigned long __x) {
-#ifndef _LIBCPP_COMPILER_MSVC
-  return __builtin_popcountl (__x);
-#else
-  static_assert(sizeof(unsigned long) == 4, "");
-  return __popcnt(__x);
-#endif
-}
-
-inline _LIBCPP_INLINE_VISIBILITY int __pop_count(unsigned long long __x) {
-#ifndef _LIBCPP_COMPILER_MSVC
-  return __builtin_popcountll(__x);
-#else
-  static_assert(sizeof(unsigned long long) == 8, "");
-  return __popcnt64(__x);
-#endif
-}
-
 // all_of
 
 template <class _InputIterator, class _Predicate>
@@ -2533,6 +2399,8 @@
 _ForwardIterator
 min_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
 {
+    static_assert(__is_forward_iterator<_ForwardIterator>::value,
+        "std::min_element requires a ForwardIterator");
     if (__first != __last)
     {
         _ForwardIterator __i = __first;
@@ -2597,6 +2465,8 @@
 _ForwardIterator
 max_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
 {
+    static_assert(__is_forward_iterator<_ForwardIterator>::value,
+        "std::max_element requires a ForwardIterator");
     if (__first != __last)
     {
         _ForwardIterator __i = __first;
@@ -2683,6 +2553,8 @@
 std::pair<_ForwardIterator, _ForwardIterator>
 minmax_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
 {
+  static_assert(__is_forward_iterator<_ForwardIterator>::value,
+        "std::minmax_element requires a ForwardIterator");
   std::pair<_ForwardIterator, _ForwardIterator> __result(__first, __first);
   if (__first != __last)
   {
@@ -3027,10 +2899,11 @@
 template<class _URNG>
 typename uniform_int_distribution<_IntType>::result_type
 uniform_int_distribution<_IntType>::operator()(_URNG& __g, const param_type& __p)
+_LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
 {
     typedef typename conditional<sizeof(result_type) <= sizeof(uint32_t),
                                             uint32_t, uint64_t>::type _UIntType;
-    const _UIntType _Rp = __p.b() - __p.a() + _UIntType(1);
+    const _UIntType _Rp = _UIntType(__p.b()) - _UIntType(__p.a()) + _UIntType(1);
     if (_Rp == 1)
         return __p.a();
     const size_t _Dt = numeric_limits<_UIntType>::digits;
@@ -3080,7 +2953,7 @@
 _LIBCPP_FUNC_VIS __rs_default __rs_get();
 
 template <class _RandomAccessIterator>
-void
+_LIBCPP_DEPRECATED_IN_CXX14 void
 random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last)
 {
     typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
@@ -3101,7 +2974,7 @@
 }
 
 template <class _RandomAccessIterator, class _RandomNumberGenerator>
-void
+_LIBCPP_DEPRECATED_IN_CXX14 void
 random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last,
 #ifndef _LIBCPP_CXX03_LANG
                _RandomNumberGenerator&& __rand)
@@ -3116,7 +2989,8 @@
         for (--__last; __first < __last; ++__first, --__d)
         {
             difference_type __i = __rand(__d);
-            swap(*__first, *(__first + __i));
+            if (__i != difference_type(0))
+              swap(*__first, *(__first + __i));
         }
     }
 }
diff --git a/linux-x64/clang/include/c++/v1/any b/linux-x64/clang/include/c++/v1/any
index e6e0b6e..e2945bd 100644
--- a/linux-x64/clang/include/c++/v1/any
+++ b/linux-x64/clang/include/c++/v1/any
@@ -87,6 +87,7 @@
 #include <typeinfo>
 #include <type_traits>
 #include <cstdlib>
+#include <version>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
diff --git a/linux-x64/clang/include/c++/v1/array b/linux-x64/clang/include/c++/v1/array
index ba4ff42..8f4e111 100644
--- a/linux-x64/clang/include/c++/v1/array
+++ b/linux-x64/clang/include/c++/v1/array
@@ -112,6 +112,7 @@
 #include <algorithm>
 #include <stdexcept>
 #include <cstdlib> // for _LIBCPP_UNREACHABLE
+#include <version>
 #include <__debug>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
diff --git a/linux-x64/clang/include/c++/v1/atomic b/linux-x64/clang/include/c++/v1/atomic
index 809f78a..d37e7b4 100644
--- a/linux-x64/clang/include/c++/v1/atomic
+++ b/linux-x64/clang/include/c++/v1/atomic
@@ -544,6 +544,7 @@
 #include <cstddef>
 #include <cstdint>
 #include <type_traits>
+#include <version>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
@@ -559,10 +560,6 @@
 #error C++ standard library is incompatible with <stdatomic.h>
 #endif
 
-#if _LIBCPP_STD_VER > 14
-# define __cpp_lib_atomic_is_always_lock_free 201603L
-#endif
-
 #define _LIBCPP_CHECK_STORE_MEMORY_ORDER(__m) \
   _LIBCPP_DIAGNOSE_WARNING(__m == memory_order_consume || \
                            __m == memory_order_acquire || \
diff --git a/linux-x64/clang/include/c++/v1/bit b/linux-x64/clang/include/c++/v1/bit
new file mode 100644
index 0000000..db3812e
--- /dev/null
+++ b/linux-x64/clang/include/c++/v1/bit
@@ -0,0 +1,158 @@
+// -*- C++ -*-
+//===------------------------------ bit ----------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===---------------------------------------------------------------------===//
+
+#ifndef _LIBCPP_BIT
+#define _LIBCPP_BIT
+
+/*
+    bit synopsis
+
+namespace std {
+
+} // namespace std
+
+*/
+
+#include <__config>
+#include <version>
+
+#if defined(__IBMCPP__)
+#include "support/ibm/support.h"
+#endif
+#if defined(_LIBCPP_COMPILER_MSVC)
+#include <intrin.h>
+#endif
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+#ifndef _LIBCPP_COMPILER_MSVC
+
+inline _LIBCPP_INLINE_VISIBILITY
+int __ctz(unsigned __x)           { return __builtin_ctz(__x); }
+
+inline _LIBCPP_INLINE_VISIBILITY
+int __ctz(unsigned long __x)      { return __builtin_ctzl(__x); }
+
+inline _LIBCPP_INLINE_VISIBILITY
+int __ctz(unsigned long long __x) { return __builtin_ctzll(__x); }
+
+
+inline _LIBCPP_INLINE_VISIBILITY
+int __clz(unsigned __x)           { return __builtin_clz(__x); }
+
+inline _LIBCPP_INLINE_VISIBILITY
+int __clz(unsigned long __x)      { return __builtin_clzl(__x); }
+
+inline _LIBCPP_INLINE_VISIBILITY
+int __clz(unsigned long long __x) { return __builtin_clzll(__x); }
+
+
+inline _LIBCPP_INLINE_VISIBILITY
+int __popcount(unsigned __x)           { return __builtin_popcount(__x); }
+
+inline _LIBCPP_INLINE_VISIBILITY
+int __popcount(unsigned long __x)      { return __builtin_popcountl(__x); }
+
+inline _LIBCPP_INLINE_VISIBILITY
+int __popcount(unsigned long long __x) { return __builtin_popcountll(__x); }
+
+#else  // _LIBCPP_COMPILER_MSVC
+
+// Precondition:  __x != 0
+inline _LIBCPP_INLINE_VISIBILITY
+int __ctz(unsigned __x) {
+  static_assert(sizeof(unsigned) == sizeof(unsigned long), "");
+  static_assert(sizeof(unsigned long) == 4, "");
+  unsigned long __where;
+  if (_BitScanForward(&__where, __x))
+    return static_cast<int>(__where);
+  return 32;
+}
+
+inline _LIBCPP_INLINE_VISIBILITY
+int __ctz(unsigned long __x) {
+    static_assert(sizeof(unsigned long) == sizeof(unsigned), "");
+    return __ctz(static_cast<unsigned>(__x));
+}
+
+inline _LIBCPP_INLINE_VISIBILITY
+int __ctz(unsigned long long __x) {
+    unsigned long __where;
+#if defined(_LIBCPP_HAS_BITSCAN64)
+    (defined(_M_AMD64) || defined(__x86_64__))
+  if (_BitScanForward64(&__where, __x))
+    return static_cast<int>(__where);
+#else
+  // Win32 doesn't have _BitScanForward64 so emulate it with two 32 bit calls.
+  if (_BitScanForward(&__where, static_cast<unsigned long>(__x)))
+    return static_cast<int>(__where);
+  if (_BitScanForward(&__where, static_cast<unsigned long>(__x >> 32)))
+    return static_cast<int>(__where + 32);
+#endif
+  return 64;
+}
+
+// Precondition:  __x != 0
+inline _LIBCPP_INLINE_VISIBILITY
+int __clz(unsigned __x) {
+  static_assert(sizeof(unsigned) == sizeof(unsigned long), "");
+  static_assert(sizeof(unsigned long) == 4, "");
+  unsigned long __where;
+  if (_BitScanReverse(&__where, __x))
+    return static_cast<int>(31 - __where);
+  return 32; // Undefined Behavior.
+}
+
+inline _LIBCPP_INLINE_VISIBILITY
+int __clz(unsigned long __x) {
+    static_assert(sizeof(unsigned) == sizeof(unsigned long), "");
+    return __clz(static_cast<unsigned>(__x));
+}
+
+inline _LIBCPP_INLINE_VISIBILITY
+int __clz(unsigned long long __x) {
+  unsigned long __where;
+#if defined(_LIBCPP_HAS_BITSCAN64)
+  if (_BitScanReverse64(&__where, __x))
+    return static_cast<int>(63 - __where);
+#else
+  // Win32 doesn't have _BitScanReverse64 so emulate it with two 32 bit calls.
+  if (_BitScanReverse(&__where, static_cast<unsigned long>(__x >> 32)))
+    return static_cast<int>(63 - (__where + 32));
+  if (_BitScanReverse(&__where, static_cast<unsigned long>(__x)))
+    return static_cast<int>(63 - __where);
+#endif
+  return 64; // Undefined Behavior.
+}
+
+inline _LIBCPP_INLINE_VISIBILITY int __popcount(unsigned __x) {
+  static_assert(sizeof(unsigned) == 4, "");
+  return __popcnt(__x);
+}
+
+inline _LIBCPP_INLINE_VISIBILITY int __popcount(unsigned long __x) {
+  static_assert(sizeof(unsigned long) == 4, "");
+  return __popcnt(__x);
+}
+
+inline _LIBCPP_INLINE_VISIBILITY int __popcount(unsigned long long __x) {
+  static_assert(sizeof(unsigned long long) == 8, "");
+  return __popcnt64(__x);
+}
+
+#endif // _LIBCPP_COMPILER_MSVC
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP_BIT
diff --git a/linux-x64/clang/include/c++/v1/chrono b/linux-x64/clang/include/c++/v1/chrono
index f0bd6af..0691101 100644
--- a/linux-x64/clang/include/c++/v1/chrono
+++ b/linux-x64/clang/include/c++/v1/chrono
@@ -77,16 +77,18 @@
 
     constexpr common_type<duration>::type  operator+() const;
     constexpr common_type<duration>::type  operator-() const;
-    constexpr duration& operator++();
-    constexpr duration  operator++(int);
-    constexpr duration& operator--();
-    constexpr duration  operator--(int);
+    constexpr duration& operator++();    // constexpr in C++17
+    constexpr duration  operator++(int); // constexpr in C++17
+    constexpr duration& operator--();    // constexpr in C++17
+    constexpr duration  operator--(int); // constexpr in C++17
 
-    constexpr duration& operator+=(const duration& d);
-    constexpr duration& operator-=(const duration& d);
+    constexpr duration& operator+=(const duration& d);  // constexpr in C++17
+    constexpr duration& operator-=(const duration& d);  // constexpr in C++17
 
-    duration& operator*=(const rep& rhs);
-    duration& operator/=(const rep& rhs);
+    duration& operator*=(const rep& rhs);       // constexpr in C++17
+    duration& operator/=(const rep& rhs);       // constexpr in C++17
+    duration& operator%=(const rep& rhs);       // constexpr in C++17
+    duration& operator%=(const duration& rhs);  // constexpr in C++17
 
     // special values
 
@@ -127,8 +129,8 @@
 
     // arithmetic
 
-    time_point& operator+=(const duration& d);
-    time_point& operator-=(const duration& d);
+    time_point& operator+=(const duration& d); // constexpr in C++17
+    time_point& operator-=(const duration& d); // constexpr in C++17
 
     // special values
 
@@ -796,6 +798,7 @@
 #include <type_traits>
 #include <ratio>
 #include <limits>
+#include <version>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
@@ -1355,8 +1358,8 @@
 
     // arithmetic
 
-    _LIBCPP_INLINE_VISIBILITY time_point& operator+=(const duration& __d) {__d_ += __d; return *this;}
-    _LIBCPP_INLINE_VISIBILITY time_point& operator-=(const duration& __d) {__d_ -= __d; return *this;}
+    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 time_point& operator+=(const duration& __d) {__d_ += __d; return *this;}
+    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 time_point& operator-=(const duration& __d) {__d_ -= __d; return *this;}
 
     // special values
 
diff --git a/linux-x64/clang/include/c++/v1/cmath b/linux-x64/clang/include/c++/v1/cmath
index ffb1c46..f5f62ad 100644
--- a/linux-x64/clang/include/c++/v1/cmath
+++ b/linux-x64/clang/include/c++/v1/cmath
@@ -303,6 +303,7 @@
 
 #include <__config>
 #include <math.h>
+#include <version>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
diff --git a/linux-x64/clang/include/c++/v1/complex b/linux-x64/clang/include/c++/v1/complex
index d692ee3..8cf6a94 100644
--- a/linux-x64/clang/include/c++/v1/complex
+++ b/linux-x64/clang/include/c++/v1/complex
@@ -245,6 +245,7 @@
 #include <stdexcept>
 #include <cmath>
 #include <sstream>
+#include <version>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
diff --git a/linux-x64/clang/include/c++/v1/cstddef b/linux-x64/clang/include/c++/v1/cstddef
index 1dc5d39..b4c42b1 100644
--- a/linux-x64/clang/include/c++/v1/cstddef
+++ b/linux-x64/clang/include/c++/v1/cstddef
@@ -35,6 +35,7 @@
 */
 
 #include <__config>
+#include <version>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
@@ -50,7 +51,7 @@
 using ::size_t;
 
 #if defined(__CLANG_MAX_ALIGN_T_DEFINED) || defined(_GCC_MAX_ALIGN_T) || \
-    defined(__DEFINED_max_align_t)
+    defined(__DEFINED_max_align_t) || defined(__NetBSD__)
 // Re-use the compiler's <stddef.h> max_align_t where possible.
 using ::max_align_t;
 #else
diff --git a/linux-x64/clang/include/c++/v1/cstdlib b/linux-x64/clang/include/c++/v1/cstdlib
index 78c4284..00c604e 100644
--- a/linux-x64/clang/include/c++/v1/cstdlib
+++ b/linux-x64/clang/include/c++/v1/cstdlib
@@ -151,11 +151,11 @@
 using ::wctomb;
 using ::mbstowcs;
 using ::wcstombs;
-#ifdef _LIBCPP_HAS_QUICK_EXIT
+#if !defined(_LIBCPP_CXX03_LANG) && defined(_LIBCPP_HAS_QUICK_EXIT)
 using ::at_quick_exit;
 using ::quick_exit;
 #endif
-#ifdef _LIBCPP_HAS_C11_FEATURES
+#if _LIBCPP_STD_VER > 14 && defined(_LIBCPP_HAS_C11_FEATURES)
 using ::aligned_alloc;
 #endif
 
diff --git a/linux-x64/clang/include/c++/v1/ctime b/linux-x64/clang/include/c++/v1/ctime
index 81cf11a..8264fe3 100644
--- a/linux-x64/clang/include/c++/v1/ctime
+++ b/linux-x64/clang/include/c++/v1/ctime
@@ -73,7 +73,7 @@
 using ::localtime;
 #endif
 using ::strftime;
-#if _LIBCPP_STD_VER > 14 && defined(_LIBCPP_HAS_C11_FEATURES)
+#if _LIBCPP_STD_VER > 14 && defined(_LIBCPP_HAS_TIMESPEC_GET)
 using ::timespec_get;
 #endif
 
diff --git a/linux-x64/clang/include/c++/v1/deque b/linux-x64/clang/include/c++/v1/deque
index bfbd3a5..414c7a8 100644
--- a/linux-x64/clang/include/c++/v1/deque
+++ b/linux-x64/clang/include/c++/v1/deque
@@ -161,6 +161,7 @@
 #include <iterator>
 #include <algorithm>
 #include <stdexcept>
+#include <version>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
diff --git a/linux-x64/clang/include/c++/v1/exception b/linux-x64/clang/include/c++/v1/exception
index b517486..7fd9279 100644
--- a/linux-x64/clang/include/c++/v1/exception
+++ b/linux-x64/clang/include/c++/v1/exception
@@ -81,6 +81,7 @@
 #include <cstddef>
 #include <cstdlib>
 #include <type_traits>
+#include <version>
 
 #if defined(_LIBCPP_ABI_MICROSOFT) && !defined(_LIBCPP_NO_VCRUNTIME)
 #include <vcruntime_exception.h>
diff --git a/linux-x64/clang/include/c++/v1/filesystem b/linux-x64/clang/include/c++/v1/filesystem
index aa1d718..339bb25 100644
--- a/linux-x64/clang/include/c++/v1/filesystem
+++ b/linux-x64/clang/include/c++/v1/filesystem
@@ -244,6 +244,7 @@
 #include <utility>
 #include <iomanip> // for quoted
 #include <string_view>
+#include <version>
 
 #include <__debug>
 
@@ -256,10 +257,6 @@
 
 #ifndef _LIBCPP_CXX03_LANG
 
-#if _LIBCPP_STD_VER >= 17
-#define __cpp_lib_filesystem 201703
-#endif
-
 _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
 
 struct _FilesystemClock {
@@ -590,7 +587,7 @@
 typename enable_if<__can_convert_char<_ECharT>::value, bool>::type
 __is_separator(_ECharT __e) {
   return __e == _ECharT('/');
-};
+}
 
 struct _NullSentinal {};
 
diff --git a/linux-x64/clang/include/c++/v1/forward_list b/linux-x64/clang/include/c++/v1/forward_list
index 571afdc..f9a71f0 100644
--- a/linux-x64/clang/include/c++/v1/forward_list
+++ b/linux-x64/clang/include/c++/v1/forward_list
@@ -177,6 +177,7 @@
 #include <limits>
 #include <iterator>
 #include <algorithm>
+#include <version>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
diff --git a/linux-x64/clang/include/c++/v1/functional b/linux-x64/clang/include/c++/v1/functional
index b91fd75..61c87b0 100644
--- a/linux-x64/clang/include/c++/v1/functional
+++ b/linux-x64/clang/include/c++/v1/functional
@@ -183,7 +183,7 @@
 };
 
 template <class Predicate>
-class unary_negate
+class unary_negate // deprecated in C++17
     : public unary_function<typename Predicate::argument_type, bool>
 {
 public:
@@ -191,10 +191,11 @@
     bool operator()(const typename Predicate::argument_type& x) const;
 };
 
-template <class Predicate> unary_negate<Predicate> not1(const Predicate& pred);
+template <class Predicate> // deprecated in C++17
+unary_negate<Predicate> not1(const Predicate& pred);
 
 template <class Predicate>
-class binary_negate
+class binary_negate // deprecated in C++17
     : public binary_function<typename Predicate::first_argument_type,
                              typename Predicate::second_argument_type,
                              bool>
@@ -205,7 +206,8 @@
                     const typename Predicate::second_argument_type& y) const;
 };
 
-template <class Predicate> binary_negate<Predicate> not2(const Predicate& pred);
+template <class Predicate> // deprecated in C++17
+binary_negate<Predicate> not2(const Predicate& pred);
 
 template <class F> unspecified not_fn(F&& f); // C++17
 
@@ -487,6 +489,7 @@
 #include <memory>
 #include <tuple>
 #include <utility>
+#include <version>
 
 #include <__functional_base>
 
@@ -980,7 +983,7 @@
 #endif
 
 template <class _Predicate>
-class _LIBCPP_TEMPLATE_VIS unary_negate
+class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 unary_negate
     : public unary_function<typename _Predicate::argument_type, bool>
 {
     _Predicate __pred_;
@@ -994,12 +997,12 @@
 };
 
 template <class _Predicate>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_DEPRECATED_IN_CXX17 inline _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
 unary_negate<_Predicate>
 not1(const _Predicate& __pred) {return unary_negate<_Predicate>(__pred);}
 
 template <class _Predicate>
-class _LIBCPP_TEMPLATE_VIS binary_negate
+class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 binary_negate
     : public binary_function<typename _Predicate::first_argument_type,
                              typename _Predicate::second_argument_type,
                              bool>
@@ -1016,13 +1019,13 @@
 };
 
 template <class _Predicate>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_DEPRECATED_IN_CXX17 inline _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
 binary_negate<_Predicate>
 not2(const _Predicate& __pred) {return binary_negate<_Predicate>(__pred);}
 
 #if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS)
 template <class __Operation>
-class _LIBCPP_TEMPLATE_VIS binder1st
+class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 binder1st
     : public unary_function<typename __Operation::second_argument_type,
                             typename __Operation::result_type>
 {
@@ -1042,13 +1045,13 @@
 };
 
 template <class __Operation, class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
 binder1st<__Operation>
 bind1st(const __Operation& __op, const _Tp& __x)
     {return binder1st<__Operation>(__op, __x);}
 
 template <class __Operation>
-class _LIBCPP_TEMPLATE_VIS binder2nd
+class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 binder2nd
     : public unary_function<typename __Operation::first_argument_type,
                             typename __Operation::result_type>
 {
@@ -1068,13 +1071,13 @@
 };
 
 template <class __Operation, class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
 binder2nd<__Operation>
 bind2nd(const __Operation& __op, const _Tp& __x)
     {return binder2nd<__Operation>(__op, __x);}
 
 template <class _Arg, class _Result>
-class _LIBCPP_TEMPLATE_VIS pointer_to_unary_function
+class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 pointer_to_unary_function
     : public unary_function<_Arg, _Result>
 {
     _Result (*__f_)(_Arg);
@@ -1086,13 +1089,13 @@
 };
 
 template <class _Arg, class _Result>
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
 pointer_to_unary_function<_Arg,_Result>
 ptr_fun(_Result (*__f)(_Arg))
     {return pointer_to_unary_function<_Arg,_Result>(__f);}
 
 template <class _Arg1, class _Arg2, class _Result>
-class _LIBCPP_TEMPLATE_VIS pointer_to_binary_function
+class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 pointer_to_binary_function
     : public binary_function<_Arg1, _Arg2, _Result>
 {
     _Result (*__f_)(_Arg1, _Arg2);
@@ -1104,13 +1107,14 @@
 };
 
 template <class _Arg1, class _Arg2, class _Result>
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
 pointer_to_binary_function<_Arg1,_Arg2,_Result>
 ptr_fun(_Result (*__f)(_Arg1,_Arg2))
     {return pointer_to_binary_function<_Arg1,_Arg2,_Result>(__f);}
 
 template<class _Sp, class _Tp>
-class _LIBCPP_TEMPLATE_VIS mem_fun_t : public unary_function<_Tp*, _Sp>
+class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 mem_fun_t
+    : public unary_function<_Tp*, _Sp>
 {
     _Sp (_Tp::*__p_)();
 public:
@@ -1121,7 +1125,8 @@
 };
 
 template<class _Sp, class _Tp, class _Ap>
-class _LIBCPP_TEMPLATE_VIS mem_fun1_t : public binary_function<_Tp*, _Ap, _Sp>
+class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 mem_fun1_t
+    : public binary_function<_Tp*, _Ap, _Sp>
 {
     _Sp (_Tp::*__p_)(_Ap);
 public:
@@ -1132,19 +1137,20 @@
 };
 
 template<class _Sp, class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
 mem_fun_t<_Sp,_Tp>
 mem_fun(_Sp (_Tp::*__f)())
     {return mem_fun_t<_Sp,_Tp>(__f);}
 
 template<class _Sp, class _Tp, class _Ap>
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
 mem_fun1_t<_Sp,_Tp,_Ap>
 mem_fun(_Sp (_Tp::*__f)(_Ap))
     {return mem_fun1_t<_Sp,_Tp,_Ap>(__f);}
 
 template<class _Sp, class _Tp>
-class _LIBCPP_TEMPLATE_VIS mem_fun_ref_t : public unary_function<_Tp, _Sp>
+class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 mem_fun_ref_t
+    : public unary_function<_Tp, _Sp>
 {
     _Sp (_Tp::*__p_)();
 public:
@@ -1155,7 +1161,8 @@
 };
 
 template<class _Sp, class _Tp, class _Ap>
-class _LIBCPP_TEMPLATE_VIS mem_fun1_ref_t : public binary_function<_Tp, _Ap, _Sp>
+class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 mem_fun1_ref_t
+    : public binary_function<_Tp, _Ap, _Sp>
 {
     _Sp (_Tp::*__p_)(_Ap);
 public:
@@ -1166,19 +1173,20 @@
 };
 
 template<class _Sp, class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
 mem_fun_ref_t<_Sp,_Tp>
 mem_fun_ref(_Sp (_Tp::*__f)())
     {return mem_fun_ref_t<_Sp,_Tp>(__f);}
 
 template<class _Sp, class _Tp, class _Ap>
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
 mem_fun1_ref_t<_Sp,_Tp,_Ap>
 mem_fun_ref(_Sp (_Tp::*__f)(_Ap))
     {return mem_fun1_ref_t<_Sp,_Tp,_Ap>(__f);}
 
 template <class _Sp, class _Tp>
-class _LIBCPP_TEMPLATE_VIS const_mem_fun_t : public unary_function<const _Tp*, _Sp>
+class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 const_mem_fun_t
+    : public unary_function<const _Tp*, _Sp>
 {
     _Sp (_Tp::*__p_)() const;
 public:
@@ -1189,7 +1197,8 @@
 };
 
 template <class _Sp, class _Tp, class _Ap>
-class _LIBCPP_TEMPLATE_VIS const_mem_fun1_t : public binary_function<const _Tp*, _Ap, _Sp>
+class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 const_mem_fun1_t
+    : public binary_function<const _Tp*, _Ap, _Sp>
 {
     _Sp (_Tp::*__p_)(_Ap) const;
 public:
@@ -1200,19 +1209,20 @@
 };
 
 template <class _Sp, class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
 const_mem_fun_t<_Sp,_Tp>
 mem_fun(_Sp (_Tp::*__f)() const)
     {return const_mem_fun_t<_Sp,_Tp>(__f);}
 
 template <class _Sp, class _Tp, class _Ap>
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
 const_mem_fun1_t<_Sp,_Tp,_Ap>
 mem_fun(_Sp (_Tp::*__f)(_Ap) const)
     {return const_mem_fun1_t<_Sp,_Tp,_Ap>(__f);}
 
 template <class _Sp, class _Tp>
-class _LIBCPP_TEMPLATE_VIS const_mem_fun_ref_t : public unary_function<_Tp, _Sp>
+class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 const_mem_fun_ref_t
+    : public unary_function<_Tp, _Sp>
 {
     _Sp (_Tp::*__p_)() const;
 public:
@@ -1223,7 +1233,7 @@
 };
 
 template <class _Sp, class _Tp, class _Ap>
-class _LIBCPP_TEMPLATE_VIS const_mem_fun1_ref_t
+class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 const_mem_fun1_ref_t
     : public binary_function<_Tp, _Ap, _Sp>
 {
     _Sp (_Tp::*__p_)(_Ap) const;
@@ -1235,13 +1245,13 @@
 };
 
 template <class _Sp, class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
 const_mem_fun_ref_t<_Sp,_Tp>
 mem_fun_ref(_Sp (_Tp::*__f)() const)
     {return const_mem_fun_ref_t<_Sp,_Tp>(__f);}
 
 template <class _Sp, class _Tp, class _Ap>
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
 const_mem_fun1_ref_t<_Sp,_Tp,_Ap>
 mem_fun_ref(_Sp (_Tp::*__f)(_Ap) const)
     {return const_mem_fun1_ref_t<_Sp,_Tp,_Ap>(__f);}
@@ -2105,53 +2115,53 @@
 
 template <class _Ti, bool IsReferenceWrapper, bool IsBindEx, bool IsPh,
           class _TupleUj>
-struct ____mu_return;
+struct __mu_return_impl;
 
 template <bool _Invokable, class _Ti, class ..._Uj>
-struct ____mu_return_invokable  // false
+struct __mu_return_invokable  // false
 {
     typedef __nat type;
 };
 
 template <class _Ti, class ..._Uj>
-struct ____mu_return_invokable<true, _Ti, _Uj...>
+struct __mu_return_invokable<true, _Ti, _Uj...>
 {
     typedef typename __invoke_of<_Ti&, _Uj...>::type type;
 };
 
 template <class _Ti, class ..._Uj>
-struct ____mu_return<_Ti, false, true, false, tuple<_Uj...> >
-    : public ____mu_return_invokable<__invokable<_Ti&, _Uj...>::value, _Ti, _Uj...>
+struct __mu_return_impl<_Ti, false, true, false, tuple<_Uj...> >
+    : public __mu_return_invokable<__invokable<_Ti&, _Uj...>::value, _Ti, _Uj...>
 {
 };
 
 template <class _Ti, class _TupleUj>
-struct ____mu_return<_Ti, false, false, true, _TupleUj>
+struct __mu_return_impl<_Ti, false, false, true, _TupleUj>
 {
     typedef typename tuple_element<is_placeholder<_Ti>::value - 1,
                                    _TupleUj>::type&& type;
 };
 
 template <class _Ti, class _TupleUj>
-struct ____mu_return<_Ti, true, false, false, _TupleUj>
+struct __mu_return_impl<_Ti, true, false, false, _TupleUj>
 {
     typedef typename _Ti::type& type;
 };
 
 template <class _Ti, class _TupleUj>
-struct ____mu_return<_Ti, false, false, false, _TupleUj>
+struct __mu_return_impl<_Ti, false, false, false, _TupleUj>
 {
     typedef _Ti& type;
 };
 
 template <class _Ti, class _TupleUj>
 struct __mu_return
-    : public ____mu_return<_Ti,
-                           __is_reference_wrapper<_Ti>::value,
-                           is_bind_expression<_Ti>::value,
-                           0 < is_placeholder<_Ti>::value &&
-                           is_placeholder<_Ti>::value <= tuple_size<_TupleUj>::value,
-                           _TupleUj>
+    : public __mu_return_impl<_Ti,
+                              __is_reference_wrapper<_Ti>::value,
+                              is_bind_expression<_Ti>::value,
+                              0 < is_placeholder<_Ti>::value &&
+                              is_placeholder<_Ti>::value <= tuple_size<_TupleUj>::value,
+                              _TupleUj>
 {
 };
 
@@ -2340,8 +2350,6 @@
 
 #if _LIBCPP_STD_VER > 14
 
-#define __cpp_lib_invoke 201411
-
 template <class _Fn, class ..._Args>
 result_of_t<_Fn&&(_Args&&...)>
 invoke(_Fn&& __f, _Args&&... __args)
diff --git a/linux-x64/clang/include/c++/v1/future b/linux-x64/clang/include/c++/v1/future
index 0f6d426..b3ffc7e 100644
--- a/linux-x64/clang/include/c++/v1/future
+++ b/linux-x64/clang/include/c++/v1/future
@@ -556,13 +556,14 @@
         {return (__state_ & __constructed) || (__exception_ != nullptr);}
 
     _LIBCPP_INLINE_VISIBILITY
-    void __set_future_attached()
-    {
+    void __attach_future() {
         lock_guard<mutex> __lk(__mut_);
+        bool __has_future_attached = (__state_ & __future_attached) != 0;
+        if (__has_future_attached)
+            __throw_future_error(future_errc::future_already_retrieved);
+        this->__add_shared();
         __state_ |= __future_attached;
     }
-    _LIBCPP_INLINE_VISIBILITY
-    bool __has_future_attached() const {return (__state_ & __future_attached) != 0;}
 
     _LIBCPP_INLINE_VISIBILITY
     void __set_deferred() {__state_ |= deferred;}
@@ -1154,10 +1155,7 @@
 future<_Rp>::future(__assoc_state<_Rp>* __state)
     : __state_(__state)
 {
-    if (__state_->__has_future_attached())
-        __throw_future_error(future_errc::future_already_retrieved);
-    __state_->__add_shared();
-    __state_->__set_future_attached();
+    __state_->__attach_future();
 }
 
 struct __release_shared_count
@@ -1257,10 +1255,7 @@
 future<_Rp&>::future(__assoc_state<_Rp&>* __state)
     : __state_(__state)
 {
-    if (__state_->__has_future_attached())
-        __throw_future_error(future_errc::future_already_retrieved);
-    __state_->__add_shared();
-    __state_->__set_future_attached();
+    __state_->__attach_future();
 }
 
 template <class _Rp>
diff --git a/linux-x64/clang/include/c++/v1/iomanip b/linux-x64/clang/include/c++/v1/iomanip
index a6bee73..36c1116 100644
--- a/linux-x64/clang/include/c++/v1/iomanip
+++ b/linux-x64/clang/include/c++/v1/iomanip
@@ -46,6 +46,7 @@
 #include <__config>
 #include <__string>
 #include <istream>
+#include <version>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
diff --git a/linux-x64/clang/include/c++/v1/iterator b/linux-x64/clang/include/c++/v1/iterator
index 9415e0b..aed0525 100644
--- a/linux-x64/clang/include/c++/v1/iterator
+++ b/linux-x64/clang/include/c++/v1/iterator
@@ -418,6 +418,7 @@
 #include <type_traits>
 #include <cstddef>
 #include <initializer_list>
+#include <version>
 #ifdef __APPLE__
 #include <Availability.h>
 #endif
diff --git a/linux-x64/clang/include/c++/v1/list b/linux-x64/clang/include/c++/v1/list
index d2e78cd..8f0e1db 100644
--- a/linux-x64/clang/include/c++/v1/list
+++ b/linux-x64/clang/include/c++/v1/list
@@ -181,6 +181,7 @@
 #include <iterator>
 #include <algorithm>
 #include <type_traits>
+#include <version>
 
 #include <__debug>
 
@@ -2208,7 +2209,7 @@
 void
 list<_Tp, _Alloc>::merge(list& __c, _Comp __comp)
 {
-    if (this != &__c)
+    if (this != _VSTD::addressof(__c))
     {
         iterator __f1 = begin();
         iterator __e1 = end();
diff --git a/linux-x64/clang/include/c++/v1/map b/linux-x64/clang/include/c++/v1/map
index 559ec48..cfd8280 100644
--- a/linux-x64/clang/include/c++/v1/map
+++ b/linux-x64/clang/include/c++/v1/map
@@ -460,6 +460,7 @@
 #include <functional>
 #include <initializer_list>
 #include <type_traits>
+#include <version>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
@@ -1884,7 +1885,7 @@
 #endif
 
     _LIBCPP_INLINE_VISIBILITY
-    void clear() {__tree_.clear();}
+    void clear() _NOEXCEPT {__tree_.clear();}
 
     _LIBCPP_INLINE_VISIBILITY
     void swap(multimap& __m)
diff --git a/linux-x64/clang/include/c++/v1/memory b/linux-x64/clang/include/c++/v1/memory
index a4bf89b..6e292a5 100644
--- a/linux-x64/clang/include/c++/v1/memory
+++ b/linux-x64/clang/include/c++/v1/memory
@@ -212,10 +212,10 @@
 template <class ForwardIterator, class Size>
  ForwardIterator uninitialized_default_construct_n(ForwardIterator first, Size n);
 
-template <class Y> struct auto_ptr_ref {};      // removed in C++17
+template <class Y> struct auto_ptr_ref {};      // deprecated in C++11, removed in C++17
 
 template<class X>
-class auto_ptr                                  // removed in C++17
+class auto_ptr                                  // deprecated in C++11, removed in C++17
 {
 public:
     typedef X element_type;
@@ -667,6 +667,7 @@
 #if !defined(_LIBCPP_HAS_NO_ATOMIC_HEADER)
 #  include <atomic>
 #endif
+#include <version>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
@@ -1782,7 +1783,7 @@
     _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
     allocator() _NOEXCEPT {}
 
-    template <class _Up> 
+    template <class _Up>
     _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
     allocator(const allocator<_Up>&) _NOEXCEPT {}
 
@@ -1790,7 +1791,7 @@
         {return _VSTD::addressof(__x);}
     _LIBCPP_INLINE_VISIBILITY const_pointer address(const_reference __x) const _NOEXCEPT
         {return _VSTD::addressof(__x);}
-    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY 
+    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
     pointer allocate(size_type __n, allocator<void>::const_pointer = 0)
         {
         if (__n > max_size())
@@ -1887,7 +1888,7 @@
     allocator() _NOEXCEPT {}
 
     template <class _Up>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 
+    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
     allocator(const allocator<_Up>&) _NOEXCEPT {}
 
     _LIBCPP_INLINE_VISIBILITY const_pointer address(const_reference __x) const _NOEXCEPT
@@ -1989,10 +1990,10 @@
     _LIBCPP_INLINE_VISIBILITY explicit raw_storage_iterator(_OutputIterator __x) : __x_(__x) {}
     _LIBCPP_INLINE_VISIBILITY raw_storage_iterator& operator*() {return *this;}
     _LIBCPP_INLINE_VISIBILITY raw_storage_iterator& operator=(const _Tp& __element)
-        {::new(&*__x_) _Tp(__element); return *this;}
+        {::new(_VSTD::addressof(*__x_)) _Tp(__element); return *this;}
 #if _LIBCPP_STD_VER >= 14
     _LIBCPP_INLINE_VISIBILITY raw_storage_iterator& operator=(_Tp&& __element)
-        {::new(&*__x_) _Tp(_VSTD::move(__element)); return *this;}
+        {::new(_VSTD::addressof(*__x_)) _Tp(_VSTD::move(__element)); return *this;}
 #endif
     _LIBCPP_INLINE_VISIBILITY raw_storage_iterator& operator++() {++__x_; return *this;}
     _LIBCPP_INLINE_VISIBILITY raw_storage_iterator  operator++(int)
@@ -2003,7 +2004,7 @@
 };
 
 template <class _Tp>
-_LIBCPP_NO_CFI
+_LIBCPP_NODISCARD_EXT _LIBCPP_NO_CFI
 pair<_Tp*, ptrdiff_t>
 get_temporary_buffer(ptrdiff_t __n) _NOEXCEPT
 {
@@ -2056,13 +2057,13 @@
 
 #if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)
 template <class _Tp>
-struct auto_ptr_ref
+struct _LIBCPP_DEPRECATED_IN_CXX11 auto_ptr_ref
 {
     _Tp* __ptr_;
 };
 
 template<class _Tp>
-class _LIBCPP_TEMPLATE_VIS auto_ptr
+class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 auto_ptr
 {
 private:
     _Tp* __ptr_;
@@ -2106,7 +2107,7 @@
 };
 
 template <>
-class _LIBCPP_TEMPLATE_VIS auto_ptr<void>
+class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 auto_ptr<void>
 {
 public:
     typedef void element_type;
@@ -2130,7 +2131,9 @@
   _LIBCPP_INLINE_VISIBILITY
   constexpr explicit
   __compressed_pair_elem(_Up&& __u)
-      : __value_(_VSTD::forward<_Up>(__u)){};
+      : __value_(_VSTD::forward<_Up>(__u))
+    {
+    }
 
   template <class... _Args, size_t... _Indexes>
   _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
@@ -2167,7 +2170,8 @@
   _LIBCPP_INLINE_VISIBILITY
   constexpr explicit
   __compressed_pair_elem(_Up&& __u)
-      : __value_type(_VSTD::forward<_Up>(__u)){};
+      : __value_type(_VSTD::forward<_Up>(__u))
+  {}
 
   template <class... _Args, size_t... _Indexes>
   _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
@@ -3682,7 +3686,7 @@
     virtual void __on_zero_shared_weak() _NOEXCEPT;
 public:
     _LIBCPP_INLINE_VISIBILITY
-    _Tp* get() _NOEXCEPT {return &__data_.second();}
+    _Tp* get() _NOEXCEPT {return _VSTD::addressof(__data_.second());}
 };
 
 template <class _Tp, class _Alloc>
@@ -5631,8 +5635,11 @@
     _Tp &   get() { return *__addr(); }
 
     template<class... _Args>
-    __temp_value(_Alloc &__alloc, _Args&& ... __args) : __a(__alloc)
-    { _Traits::construct(__a, __addr(), _VSTD::forward<_Args>(__args)...); }
+    _LIBCPP_NO_CFI
+    __temp_value(_Alloc &__alloc, _Args&& ... __args) : __a(__alloc) {
+      _Traits::construct(__a, reinterpret_cast<_Tp*>(addressof(__v)),
+                         _VSTD::forward<_Args>(__args)...);
+    }
 
     ~__temp_value() { _Traits::destroy(__a, __addr()); }
     };
diff --git a/linux-x64/clang/include/c++/v1/module.modulemap b/linux-x64/clang/include/c++/v1/module.modulemap
index 0895055..681c80b 100644
--- a/linux-x64/clang/include/c++/v1/module.modulemap
+++ b/linux-x64/clang/include/c++/v1/module.modulemap
@@ -228,6 +228,10 @@
     header "atomic"
     export *
   }
+  module bit {
+    header "bit"
+    export *
+  }
   module bitset {
     header "bitset"
     export string
diff --git a/linux-x64/clang/include/c++/v1/mutex b/linux-x64/clang/include/c++/v1/mutex
index 52e39b0..6d2de2b 100644
--- a/linux-x64/clang/include/c++/v1/mutex
+++ b/linux-x64/clang/include/c++/v1/mutex
@@ -194,6 +194,7 @@
 #ifndef _LIBCPP_CXX03_LANG
 #include <tuple>
 #endif
+#include <version>
 #include <__threading_support>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -488,7 +489,7 @@
 };
 
 template <class _Mutex>
-class _LIBCPP_TEMPLATE_VIS scoped_lock<_Mutex> {
+class _LIBCPP_TEMPLATE_VIS _LIBCPP_THREAD_SAFETY_ANNOTATION(scoped_lockable) scoped_lock<_Mutex> {
 public:
     typedef _Mutex  mutex_type;
 private:
diff --git a/linux-x64/clang/include/c++/v1/new b/linux-x64/clang/include/c++/v1/new
index d33f691..7c3076c 100644
--- a/linux-x64/clang/include/c++/v1/new
+++ b/linux-x64/clang/include/c++/v1/new
@@ -91,6 +91,7 @@
 #include <exception>
 #include <type_traits>
 #include <cstddef>
+#include <version>
 #ifdef _LIBCPP_NO_EXCEPTIONS
 #include <cstdlib>
 #endif
@@ -108,13 +109,6 @@
 # define _LIBCPP_HAS_NO_SIZED_DEALLOCATION
 #endif
 
-#if !defined(_LIBCPP_HAS_NO_ALIGNED_ALLOCATION) && \
-    (!(defined(_LIBCPP_BUILDING_LIBRARY) || _LIBCPP_STD_VER > 14 || \
-    (defined(__cpp_aligned_new) && __cpp_aligned_new >= 201606)))
-# define _LIBCPP_HAS_NO_ALIGNED_ALLOCATION
-#endif
-
-
 #if !__has_builtin(__builtin_operator_new) || \
    __has_builtin(__builtin_operator_new) < 201802L || \
    defined(_LIBCPP_HAS_NO_ALIGNED_ALLOCATION) || \
@@ -177,6 +171,10 @@
 enum align_val_t { __zero = 0, __max = (size_t)-1 };
 #endif
 #endif
+#elif !defined(__cpp_aligned_new)
+// We're defering to Microsoft's STL to provide aligned new et al. We don't
+// have it unless the language feature test macro is defined.
+#define _LIBCPP_HAS_NO_ALIGNED_ALLOCATION
 #endif
 
 }  // std
diff --git a/linux-x64/clang/include/c++/v1/numeric b/linux-x64/clang/include/c++/v1/numeric
index 70ef173..4e68239 100644
--- a/linux-x64/clang/include/c++/v1/numeric
+++ b/linux-x64/clang/include/c++/v1/numeric
@@ -142,6 +142,7 @@
 #include <iterator>
 #include <limits> // for numeric_limits
 #include <functional>
+#include <version>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
diff --git a/linux-x64/clang/include/c++/v1/optional b/linux-x64/clang/include/c++/v1/optional
index a76f8d1..9ef0aac 100644
--- a/linux-x64/clang/include/c++/v1/optional
+++ b/linux-x64/clang/include/c++/v1/optional
@@ -156,6 +156,7 @@
 #include <stdexcept>
 #include <type_traits>
 #include <utility>
+#include <version>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
diff --git a/linux-x64/clang/include/c++/v1/random b/linux-x64/clang/include/c++/v1/random
index 89664a6..724bd0f 100644
--- a/linux-x64/clang/include/c++/v1/random
+++ b/linux-x64/clang/include/c++/v1/random
@@ -2337,7 +2337,7 @@
         for (size_t __i = 1; __i < __n; ++__i)
             if (__x_[__i] != 0)
                 return;
-        __x_[0] = _Max;
+        __x_[0] = result_type(1) << (__w - 1);
     }
 }
 
@@ -2363,7 +2363,7 @@
         for (size_t __i = 1; __i < __n; ++__i)
             if (__x_[__i] != 0)
                 return;
-        __x_[0] = _Max;
+        __x_[0] = result_type(1) << (__w - 1);
     }
 }
 
diff --git a/linux-x64/clang/include/c++/v1/regex b/linux-x64/clang/include/c++/v1/regex
index 84aacc0..1858500 100644
--- a/linux-x64/clang/include/c++/v1/regex
+++ b/linux-x64/clang/include/c++/v1/regex
@@ -769,6 +769,7 @@
 #include <memory>
 #include <vector>
 #include <deque>
+#include <version>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
@@ -1351,9 +1352,9 @@
     virtual ~__node() {}
 
     _LIBCPP_INLINE_VISIBILITY
-    virtual void __exec(__state&) const {};
+    virtual void __exec(__state&) const {}
     _LIBCPP_INLINE_VISIBILITY
-    virtual void __exec_split(bool, __state&) const {};
+    virtual void __exec_split(bool, __state&) const {}
 };
 
 // __end_state
@@ -2414,20 +2415,17 @@
                 goto __exit;
             }
         }
-        // set of "__found" chars =
+        // When there's at least one of __neg_chars_ and __neg_mask_, the set
+        // of "__found" chars is
         //   union(complement(union(__neg_chars_, __neg_mask_)),
         //         other cases...)
         //
-        // __neg_chars_ and __neg_mask_'d better be handled together, as there
-        // are no short circuit opportunities.
-        //
-        // In addition, when __neg_mask_/__neg_chars_ is empty, they should be
-        // treated as all ones/all chars.
+        // It doesn't make sense to check this when there are no __neg_chars_
+        // and no __neg_mask_.
+        if (!(__neg_mask_ == 0 && __neg_chars_.empty()))
         {
-          const bool __in_neg_mask = (__neg_mask_ == 0) ||
-              __traits_.isctype(__ch, __neg_mask_);
+            const bool __in_neg_mask = __traits_.isctype(__ch, __neg_mask_);
           const bool __in_neg_chars =
-              __neg_chars_.empty() ||
               std::find(__neg_chars_.begin(), __neg_chars_.end(), __ch) !=
               __neg_chars_.end();
           if (!(__in_neg_mask || __in_neg_chars))
diff --git a/linux-x64/clang/include/c++/v1/scoped_allocator b/linux-x64/clang/include/c++/v1/scoped_allocator
index 4760d94..bdbb013 100644
--- a/linux-x64/clang/include/c++/v1/scoped_allocator
+++ b/linux-x64/clang/include/c++/v1/scoped_allocator
@@ -108,6 +108,7 @@
 
 #include <__config>
 #include <memory>
+#include <version>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
diff --git a/linux-x64/clang/include/c++/v1/set b/linux-x64/clang/include/c++/v1/set
index 108a9e9..f2ce6ea 100644
--- a/linux-x64/clang/include/c++/v1/set
+++ b/linux-x64/clang/include/c++/v1/set
@@ -402,6 +402,7 @@
 #include <__tree>
 #include <__node_handle>
 #include <functional>
+#include <version>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
diff --git a/linux-x64/clang/include/c++/v1/shared_mutex b/linux-x64/clang/include/c++/v1/shared_mutex
index a7735d6..fbde0cf 100644
--- a/linux-x64/clang/include/c++/v1/shared_mutex
+++ b/linux-x64/clang/include/c++/v1/shared_mutex
@@ -124,6 +124,7 @@
 */
 
 #include <__config>
+#include <version>
 
 _LIBCPP_PUSH_MACROS
 #include <__undef_macros>
diff --git a/linux-x64/clang/include/c++/v1/span b/linux-x64/clang/include/c++/v1/span
index 5a77ff8..ea7aecb 100644
--- a/linux-x64/clang/include/c++/v1/span
+++ b/linux-x64/clang/include/c++/v1/span
@@ -242,7 +242,7 @@
         constexpr span(      _Container& __c,
             enable_if_t<__is_span_compatible_container<_Container, _Tp>::value, nullptr_t> = nullptr)
         : __data{_VSTD::data(__c)}
-        { _LIBCPP_ASSERT(_Extent == _VSTD::size(__c), "size mismatch in span's constructor (container))"); }
+        { _LIBCPP_ASSERT(_Extent == _VSTD::size(__c), "size mismatch in span's constructor (container)"); }
 
     template <class _Container>
     inline _LIBCPP_INLINE_VISIBILITY
@@ -440,7 +440,7 @@
     inline _LIBCPP_INLINE_VISIBILITY
         constexpr span<element_type, _Count> first() const noexcept
     {
-        static_assert(_Count >= 0);
+        static_assert(_Count >= 0, "Count must be >= 0 in span::first()");
         _LIBCPP_ASSERT(_Count <= size(), "Count out of range in span::first()");
         return {data(), _Count};
     }
@@ -449,7 +449,7 @@
     inline _LIBCPP_INLINE_VISIBILITY
         constexpr span<element_type, _Count> last() const noexcept
     {
-        static_assert(_Count >= 0);
+        static_assert(_Count >= 0, "Count must be >= 0 in span::last()");
         _LIBCPP_ASSERT(_Count <= size(), "Count out of range in span::last()");
         return {data() + size() - _Count, _Count};
     }
diff --git a/linux-x64/clang/include/c++/v1/stddef.h b/linux-x64/clang/include/c++/v1/stddef.h
index faf8552..f65065d 100644
--- a/linux-x64/clang/include/c++/v1/stddef.h
+++ b/linux-x64/clang/include/c++/v1/stddef.h
@@ -54,7 +54,7 @@
 
 // Re-use the compiler's <stddef.h> max_align_t where possible.
 #if !defined(__CLANG_MAX_ALIGN_T_DEFINED) && !defined(_GCC_MAX_ALIGN_T) && \
-    !defined(__DEFINED_max_align_t)
+    !defined(__DEFINED_max_align_t) && !defined(__NetBSD__)
 typedef long double max_align_t;
 #endif
 
diff --git a/linux-x64/clang/include/c++/v1/string b/linux-x64/clang/include/c++/v1/string
index 162e540..c79164c 100644
--- a/linux-x64/clang/include/c++/v1/string
+++ b/linux-x64/clang/include/c++/v1/string
@@ -510,6 +510,7 @@
 #include <type_traits>
 #include <initializer_list>
 #include <__functional_base>
+#include <version>
 #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
 #include <cstdint>
 #endif
diff --git a/linux-x64/clang/include/c++/v1/string_view b/linux-x64/clang/include/c++/v1/string_view
index 6377aeb..55dce72 100644
--- a/linux-x64/clang/include/c++/v1/string_view
+++ b/linux-x64/clang/include/c++/v1/string_view
@@ -178,6 +178,7 @@
 #include <iterator>
 #include <limits>
 #include <stdexcept>
+#include <version>
 #include <__debug>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
diff --git a/linux-x64/clang/include/c++/v1/support/win32/locale_win32.h b/linux-x64/clang/include/c++/v1/support/win32/locale_win32.h
index 68682c9..c7c6d78 100644
--- a/linux-x64/clang/include/c++/v1/support/win32/locale_win32.h
+++ b/linux-x64/clang/include/c++/v1/support/win32/locale_win32.h
@@ -35,8 +35,8 @@
         : __locale(nullptr), __locale_str(nullptr) {}
     locale_t(std::nullptr_t)
         : __locale(nullptr), __locale_str(nullptr) {}
-    locale_t(_locale_t __locale, const char* __locale_str)
-        : __locale(__locale), __locale_str(__locale_str) {}
+    locale_t(_locale_t __xlocale, const char* __xlocale_str)
+        : __locale(__xlocale), __locale_str(__xlocale_str) {}
 
     friend bool operator==(const locale_t& __left, const locale_t& __right) {
         return __left.__locale == __right.__locale;
diff --git a/linux-x64/clang/include/c++/v1/tuple b/linux-x64/clang/include/c++/v1/tuple
index b3a17e7..fb5428e 100644
--- a/linux-x64/clang/include/c++/v1/tuple
+++ b/linux-x64/clang/include/c++/v1/tuple
@@ -141,6 +141,7 @@
 #include <type_traits>
 #include <__functional_base>
 #include <utility>
+#include <version>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
diff --git a/linux-x64/clang/include/c++/v1/type_traits b/linux-x64/clang/include/c++/v1/type_traits
index e413d26..7ff67bf 100644
--- a/linux-x64/clang/include/c++/v1/type_traits
+++ b/linux-x64/clang/include/c++/v1/type_traits
@@ -404,6 +404,7 @@
 */
 #include <__config>
 #include <cstddef>
+#include <version>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
@@ -4758,7 +4759,6 @@
 
 #if _LIBCPP_STD_VER > 14
 
-#define __cpp_lib_void_t 201411
 template <class...> using void_t = void;
 
 # ifndef _LIBCPP_HAS_NO_VARIADICS
diff --git a/linux-x64/clang/include/c++/v1/unordered_map b/linux-x64/clang/include/c++/v1/unordered_map
index 348f579..fc3cfb6 100644
--- a/linux-x64/clang/include/c++/v1/unordered_map
+++ b/linux-x64/clang/include/c++/v1/unordered_map
@@ -386,6 +386,7 @@
 #include <functional>
 #include <stdexcept>
 #include <tuple>
+#include <version>
 
 #include <__debug>
 
diff --git a/linux-x64/clang/include/c++/v1/unordered_set b/linux-x64/clang/include/c++/v1/unordered_set
index 9b8560d..a219fa6 100644
--- a/linux-x64/clang/include/c++/v1/unordered_set
+++ b/linux-x64/clang/include/c++/v1/unordered_set
@@ -338,6 +338,7 @@
 #include <__hash_table>
 #include <__node_handle>
 #include <functional>
+#include <version>
 
 #include <__debug>
 
diff --git a/linux-x64/clang/include/c++/v1/utility b/linux-x64/clang/include/c++/v1/utility
index ed9bf03..5388585 100644
--- a/linux-x64/clang/include/c++/v1/utility
+++ b/linux-x64/clang/include/c++/v1/utility
@@ -203,6 +203,7 @@
 #include <cstddef>
 #include <cstring>
 #include <cstdint>
+#include <version>
 #include <__debug>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -1453,7 +1454,7 @@
     size_t operator()(float __v) const _NOEXCEPT
     {
         // -0.0 and 0.0 should return same hash
-       if (__v == 0)
+       if (__v == 0.0)
            return 0;
         return __scalar_hash<float>::operator()(__v);
     }
@@ -1467,7 +1468,7 @@
     size_t operator()(double __v) const _NOEXCEPT
     {
         // -0.0 and 0.0 should return same hash
-       if (__v == 0)
+       if (__v == 0.0)
            return 0;
         return __scalar_hash<double>::operator()(__v);
     }
@@ -1481,7 +1482,7 @@
     size_t operator()(long double __v) const _NOEXCEPT
     {
         // -0.0 and 0.0 should return same hash
-        if (__v == 0)
+        if (__v == 0.0)
             return 0;
 #if defined(__i386__)
         // Zero out padding bits
diff --git a/linux-x64/clang/include/c++/v1/variant b/linux-x64/clang/include/c++/v1/variant
index f9098f4..f9505bf 100644
--- a/linux-x64/clang/include/c++/v1/variant
+++ b/linux-x64/clang/include/c++/v1/variant
@@ -208,6 +208,7 @@
 #include <type_traits>
 #include <utility>
 #include <limits>
+#include <version>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
@@ -1320,7 +1321,7 @@
 
 template <size_t _Ip, class _Vp>
 inline _LIBCPP_INLINE_VISIBILITY
-static constexpr auto&& __generic_get(_Vp&& __v) {
+constexpr auto&& __generic_get(_Vp&& __v) {
   using __variant_detail::__access::__variant;
   if (!__holds_alternative<_Ip>(__v)) {
     __throw_bad_variant_access();
@@ -1437,6 +1438,16 @@
   return _VSTD::get_if<__find_exactly_one_t<_Tp, _Types...>::value>(__v);
 }
 
+template <class _Operator>
+struct __convert_to_bool {
+  template <class _T1, class _T2>
+  _LIBCPP_INLINE_VISIBILITY constexpr bool operator()(_T1 && __t1, _T2&& __t2) const {
+    static_assert(std::is_convertible<decltype(_Operator{}(_VSTD::forward<_T1>(__t1), _VSTD::forward<_T2>(__t2))), bool>::value,
+        "the relational operator does not return a type which is implicitly convertible to bool");
+    return _Operator{}(_VSTD::forward<_T1>(__t1), _VSTD::forward<_T2>(__t2));
+  }
+};
+
 template <class... _Types>
 inline _LIBCPP_INLINE_VISIBILITY
 constexpr bool operator==(const variant<_Types...>& __lhs,
@@ -1444,7 +1455,7 @@
   using __variant_detail::__visitation::__variant;
   if (__lhs.index() != __rhs.index()) return false;
   if (__lhs.valueless_by_exception()) return true;
-  return __variant::__visit_value_at(__lhs.index(), equal_to<>{}, __lhs, __rhs);
+  return __variant::__visit_value_at(__lhs.index(), __convert_to_bool<equal_to<>>{}, __lhs, __rhs);
 }
 
 template <class... _Types>
@@ -1455,7 +1466,7 @@
   if (__lhs.index() != __rhs.index()) return true;
   if (__lhs.valueless_by_exception()) return false;
   return __variant::__visit_value_at(
-      __lhs.index(), not_equal_to<>{}, __lhs, __rhs);
+      __lhs.index(), __convert_to_bool<not_equal_to<>>{}, __lhs, __rhs);
 }
 
 template <class... _Types>
@@ -1467,7 +1478,7 @@
   if (__lhs.valueless_by_exception()) return true;
   if (__lhs.index() < __rhs.index()) return true;
   if (__lhs.index() > __rhs.index()) return false;
-  return __variant::__visit_value_at(__lhs.index(), less<>{}, __lhs, __rhs);
+  return __variant::__visit_value_at(__lhs.index(), __convert_to_bool<less<>>{}, __lhs, __rhs);
 }
 
 template <class... _Types>
@@ -1479,7 +1490,7 @@
   if (__rhs.valueless_by_exception()) return true;
   if (__lhs.index() > __rhs.index()) return true;
   if (__lhs.index() < __rhs.index()) return false;
-  return __variant::__visit_value_at(__lhs.index(), greater<>{}, __lhs, __rhs);
+  return __variant::__visit_value_at(__lhs.index(), __convert_to_bool<greater<>>{}, __lhs, __rhs);
 }
 
 template <class... _Types>
@@ -1492,7 +1503,7 @@
   if (__lhs.index() < __rhs.index()) return true;
   if (__lhs.index() > __rhs.index()) return false;
   return __variant::__visit_value_at(
-      __lhs.index(), less_equal<>{}, __lhs, __rhs);
+      __lhs.index(), __convert_to_bool<less_equal<>>{}, __lhs, __rhs);
 }
 
 template <class... _Types>
@@ -1505,7 +1516,7 @@
   if (__lhs.index() > __rhs.index()) return true;
   if (__lhs.index() < __rhs.index()) return false;
   return __variant::__visit_value_at(
-      __lhs.index(), greater_equal<>{}, __lhs, __rhs);
+      __lhs.index(), __convert_to_bool<greater_equal<>>{}, __lhs, __rhs);
 }
 
 template <class _Visitor, class... _Vs>
diff --git a/linux-x64/clang/include/c++/v1/vector b/linux-x64/clang/include/c++/v1/vector
index 0f5006f..de7de09 100644
--- a/linux-x64/clang/include/c++/v1/vector
+++ b/linux-x64/clang/include/c++/v1/vector
@@ -276,6 +276,7 @@
 #include <stdexcept>
 #include <algorithm>
 #include <cstring>
+#include <version>
 #include <__split_buffer>
 #include <__functional_base>
 
@@ -540,13 +541,14 @@
                                     value_type,
                                     typename iterator_traits<_ForwardIterator>::reference>::value>::type* = 0);
 
-#if _LIBCPP_DEBUG_LEVEL >= 2
     _LIBCPP_INLINE_VISIBILITY
     ~vector()
     {
+        __annotate_delete();
+#if _LIBCPP_DEBUG_LEVEL >= 2
         __get_db()->__erase_c(this);
-    }
 #endif
+    }
 
     vector(const vector& __x);
     vector(const vector& __x, const allocator_type& __a);
@@ -2453,7 +2455,7 @@
     void __vdeallocate() _NOEXCEPT;
     _LIBCPP_INLINE_VISIBILITY
     static size_type __align_it(size_type __new_size) _NOEXCEPT
-        {return __new_size + (__bits_per_word-1) & ~((size_type)__bits_per_word-1);};
+        {return __new_size + (__bits_per_word-1) & ~((size_type)__bits_per_word-1);}
     _LIBCPP_INLINE_VISIBILITY  size_type __recommend(size_type __new_size) const;
     _LIBCPP_INLINE_VISIBILITY void __construct_at_end(size_type __n, bool __x);
     template <class _ForwardIterator>
diff --git a/linux-x64/clang/include/c++/v1/version b/linux-x64/clang/include/c++/v1/version
index 23a872e..80c2797 100644
--- a/linux-x64/clang/include/c++/v1/version
+++ b/linux-x64/clang/include/c++/v1/version
@@ -14,6 +14,85 @@
 /*
     version synopsis
 
+    Table 35 — Standard library feature-test macros
+Macro name                                  Value   Headers
+__cpp_lib_addressof_constexpr               201603L <memory>
+__cpp_lib_allocator_traits_is_always_equal  201411L <memory> <scoped_allocator> <string> 
+                                                    <deque> <forward_list> <list> <vector>
+                                                    <map> <set> <unordered_map> <unordered_set>
+__cpp_lib_any                               201606L <any>
+__cpp_lib_apply                             201603L <tuple>
+__cpp_lib_array_constexpr                   201603L <iterator> <array>
+__cpp_lib_as_const                          201510L <utility>
+__cpp_lib_atomic_is_always_lock_free        201603L <atomic>
+__cpp_lib_atomic_ref                        201806L <atomic>
+__cpp_lib_bit_cast                          201806L <bit>
+__cpp_lib_bool_constant                     201505L <type_traits>
+__cpp_lib_boyer_moore_searcher              201603L <functional>
+__cpp_lib_byte                              201603L <cstddef>
+__cpp_lib_chrono                            201611L <chrono>
+__cpp_lib_clamp                             201603L <algorithm>
+__cpp_lib_complex_udls                      201309L <complex>
+__cpp_lib_concepts                          201806L <concepts>
+__cpp_lib_constexpr_swap_algorithms         201806L <algorithm>
+__cpp_lib_enable_shared_from_this           201603L <memory>
+__cpp_lib_exchange_function                 201304L <utility>
+__cpp_lib_execution                         201603L <execution>
+__cpp_lib_filesystem                        201703L <filesystem>
+__cpp_lib_gcd_lcm                           201606L <numeric>
+__cpp_lib_generic_associative_lookup        201304L <map> <set>
+__cpp_lib_hardware_interference_size        201703L <new>
+__cpp_lib_has_unique_object_representations 201606L <type_traits>
+__cpp_lib_hypot                             201603L <cmath>
+__cpp_lib_incomplete_container_elements     201505L <forward_list> <list> <vector>
+__cpp_lib_integer_sequence                  201304L <utility>
+__cpp_lib_integral_constant_callable        201304L <type_traits>
+__cpp_lib_invoke                            201411L <functional>
+__cpp_lib_is_aggregate                      201703L <type_traits>
+__cpp_lib_is_final                          201402L <type_traits>
+__cpp_lib_is_invocable                      201703L <type_traits>
+__cpp_lib_is_null_pointer                   201309L <type_traits>
+__cpp_lib_is_swappable                      201603L <type_traits>
+__cpp_lib_launder                           201606L <new>
+__cpp_lib_list_remove_return_type           201806L <forward_list> <list>
+__cpp_lib_logical_traits                    201510L <type_traits>
+__cpp_lib_make_from_tuple                   201606L <tuple>
+__cpp_lib_make_reverse_iterator             201402L <iterator>
+__cpp_lib_make_unique                       201304L <memory>
+__cpp_lib_map_try_emplace                   201411L <map>
+__cpp_lib_math_special_functions            201603L <cmath>
+__cpp_lib_memory_resource                   201603L <memory_resource>
+__cpp_lib_node_extract                      201606L <map> <set> <unordered_map> <unordered_set>
+__cpp_lib_nonmember_container_access        201411L <iterator> <array> <deque> <forward_list>
+                                                    <list> <map> <regex> <set> <string>
+                                                    <unordered_map> <unordered_set> <vector>
+__cpp_lib_not_fn                            201603L <functional>
+__cpp_lib_null_iterators                    201304L <iterator>
+__cpp_lib_optional                          201606L <optional>
+__cpp_lib_parallel_algorithm                201603L <algorithm> <numeric>
+__cpp_lib_quoted_string_io                  201304L <iomanip>
+__cpp_lib_raw_memory_algorithms             201606L <memory>
+__cpp_lib_result_of_sfinae                  201210L <functional> <type_traits>
+__cpp_lib_robust_nonmodifying_seq_ops       201304L <algorithm>
+__cpp_lib_sample                            201603L <algorithm>
+__cpp_lib_scoped_lock                       201703L <mutex>
+__cpp_lib_shared_mutex                      201505L <shared_mutex>
+__cpp_lib_shared_ptr_arrays                 201611L <memory>
+__cpp_lib_shared_ptr_weak_type              201606L <memory>
+__cpp_lib_shared_timed_mutex                201402L <shared_mutex>
+__cpp_lib_string_udls                       201304L <string>
+__cpp_lib_string_view                       201606L <string> <string_view>
+__cpp_lib_to_chars                          201611L <utility>
+__cpp_lib_transformation_trait_aliases      201304L <type_traits>
+__cpp_lib_transparent_operators             201510L <memory> <functional>
+__cpp_lib_tuple_element_t                   201402L <tuple>
+__cpp_lib_tuples_by_type                    201304L <utility> <tuple>
+__cpp_lib_type_trait_variable_templates     201510L <type_traits>
+__cpp_lib_uncaught_exceptions               201411L <exception>
+__cpp_lib_unordered_map_try_emplace         201411L <unordered_map>
+__cpp_lib_variant                           201606L <variant>
+__cpp_lib_void_t                            201411L <type_traits>
+
 */
 
 #include <__config>
@@ -22,4 +101,17 @@
 #pragma GCC system_header
 #endif
 
+#if _LIBCPP_STD_VER > 11
+#endif
+
+#if _LIBCPP_STD_VER > 14
+# define __cpp_lib_atomic_is_always_lock_free           201603L
+# define __cpp_lib_filesystem                           201703L
+# define __cpp_lib_invoke                               201411L
+# define __cpp_lib_void_t                               201411L
+#endif
+
+#if _LIBCPP_STD_VER > 17
+#endif
+
 #endif  // _LIBCPP_VERSIONH