Browse Source

Fix deprecated pod type in llvm / libcxxabi

https://github.com/llvm/llvm-project/commit/fd0637cfe835d6d4d0d3ebde3663f94a7bb3cd76
hiddenpath 1 year ago
parent
commit
95ab8bd8c5

+ 4 - 3
contrib/libs/cxxsupp/libcxxabi/src/demangle/ItaniumDemangle.h

@@ -30,6 +30,7 @@
 #include <cstdlib>
 #include <cstring>
 #include <limits>
+#include <type_traits>
 #include <utility>
 
 #define FOR_EACH_NODE_KIND(X) \
@@ -114,13 +115,13 @@
 DEMANGLE_NAMESPACE_BEGIN
 
 template <class T, size_t N> class PODSmallVector {
-  static_assert(std::is_pod<T>::value,
-                "T is required to be a plain old data type");
+  static_assert(std::is_trivial<T>::value,
+                "T is required to be a trivial type");
 
   T *First = nullptr;
   T *Last = nullptr;
   T *Cap = nullptr;
-  T Inline[N] = {0};
+  T Inline[N] = {};
 
   bool isInline() const { return First == Inline; }
 

+ 4 - 3
contrib/libs/llvm14/include/llvm/Demangle/ItaniumDemangle.h

@@ -37,6 +37,7 @@
 #include <cstdlib>
 #include <cstring>
 #include <limits>
+#include <type_traits>
 #include <utility>
 
 #define FOR_EACH_NODE_KIND(X) \
@@ -121,13 +122,13 @@
 DEMANGLE_NAMESPACE_BEGIN
 
 template <class T, size_t N> class PODSmallVector {
-  static_assert(std::is_pod<T>::value,
-                "T is required to be a plain old data type");
+  static_assert(std::is_trivial<T>::value,
+                "T is required to be a trivial type");
 
   T *First = nullptr;
   T *Last = nullptr;
   T *Cap = nullptr;
-  T Inline[N] = {0};
+  T Inline[N] = {};
 
   bool isInline() const { return First == Inline; }
 

+ 4 - 3
contrib/libs/llvm16/include/llvm/Demangle/ItaniumDemangle.h

@@ -34,18 +34,19 @@
 #include <cstring>
 #include <limits>
 #include <new>
+#include <type_traits>
 #include <utility>
 
 DEMANGLE_NAMESPACE_BEGIN
 
 template <class T, size_t N> class PODSmallVector {
-  static_assert(std::is_pod<T>::value,
-                "T is required to be a plain old data type");
+  static_assert(std::is_trivial<T>::value,
+                "T is required to be a trivial type");
 
   T *First = nullptr;
   T *Last = nullptr;
   T *Cap = nullptr;
-  T Inline[N] = {0};
+  T Inline[N] = {};
 
   bool isInline() const { return First == Inline; }