[PATCH] D16565: [LLD] Fix Clang-tidy modernize-use-nullptr warnings in include/lld/Core/range.h; other minor fixes

Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 26 10:31:42 PST 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL258829: Fix Clang-tidy modernize-use-nullptr warnings in include/lld/Core/range.h… (authored by eugenezelenko).

Changed prior to commit:
  http://reviews.llvm.org/D16565?vs=45937&id=46013#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D16565

Files:
  lld/trunk/include/lld/Core/range.h

Index: lld/trunk/include/lld/Core/range.h
===================================================================
--- lld/trunk/include/lld/Core/range.h
+++ lld/trunk/include/lld/Core/range.h
@@ -29,8 +29,10 @@
 namespace lld {
 // Nothing in this namespace is part of the exported interface.
 namespace detail {
+
 using std::begin;
 using std::end;
+
 /// Used as the result type of undefined functions.
 struct undefined {};
 
@@ -197,7 +199,7 @@
         !std::is_pointer<Iterator>::value &&
         detail::is_range<R>::value &&
         std::is_convertible<typename detail::begin_result<R>::type,
-                            Iterator>::value>::type* = 0)
+                            Iterator>::value>::type* = nullptr)
       : begin_(detail::adl_begin(r)), end_(detail::adl_end(r)) {}
 
   /// This constructor creates a \c range<T*> from any range with
@@ -229,7 +231,7 @@
         && detail::conversion_preserves_array_indexing<
              decltype(&*detail::adl_begin(r)), Iterator>::value
 #endif
-      >::type* = 0)
+      >::type* = nullptr)
       : begin_((detail::adl_begin(r) == detail::adl_end(r) &&
                 !std::is_pointer<decltype(detail::adl_begin(r))>::value)
                // For non-pointers, &*begin(r) is only defined behavior
@@ -714,7 +716,7 @@
 /// \c begin(r) and \c end(r) return the same type.
 template <typename Range> LLVM_CONSTEXPR auto make_range(
     Range &&r,
-    typename std::enable_if<detail::is_range<Range>::value>::type* = 0)
+    typename std::enable_if<detail::is_range<Range>::value>::type* = nullptr)
     -> range<decltype(detail::adl_begin(r))> {
   return range<decltype(detail::adl_begin(r))>(r);
 }
@@ -728,11 +730,11 @@
     Range &&r,
     typename std::enable_if<
       detail::is_contiguous_range<Range>::value &&
-      std::is_pointer<decltype(&*detail::adl_begin(r))>::value>::type* = 0)
-      -> range<decltype(&*detail::adl_begin(r))> {
+      std::is_pointer<decltype(&*detail::adl_begin(r))>::value>::type* =
+      nullptr) -> range<decltype(&*detail::adl_begin(r))> {
   return range<decltype(&*detail::adl_begin(r))>(r);
 }
 /// @}
 } // end namespace lld
 
-#endif
+#endif // LLD_CORE_RANGE_H


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16565.46013.patch
Type: text/x-patch
Size: 2182 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160126/f6d174e1/attachment.bin>


More information about the llvm-commits mailing list