[llvm] r242988 - Replace a 0 with nullptr. NFC

David Blaikie dblaikie at gmail.com
Thu Jul 23 10:21:19 PDT 2015


Any interest in implementing (& turning on for the LLVM project)
-Wzero-as-null-pointer-constant
in Clang?

On Thu, Jul 23, 2015 at 12:17 AM, Craig Topper <craig.topper at gmail.com>
wrote:

> Author: ctopper
> Date: Thu Jul 23 02:17:53 2015
> New Revision: 242988
>
> URL: http://llvm.org/viewvc/llvm-project?rev=242988&view=rev
> Log:
> Replace a 0 with nullptr. NFC
>
> Modified:
>     llvm/trunk/include/llvm/ADT/ArrayRef.h
>
> Modified: llvm/trunk/include/llvm/ADT/ArrayRef.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ArrayRef.h?rev=242988&r1=242987&r2=242988&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm/ADT/ArrayRef.h (original)
> +++ llvm/trunk/include/llvm/ADT/ArrayRef.h Thu Jul 23 02:17:53 2015
> @@ -85,7 +85,7 @@ namespace llvm {
>
>      /// Construct an ArrayRef from a std::initializer_list.
>      /*implicit*/ ArrayRef(const std::initializer_list<T> &Vec)
> -    : Data(Vec.begin() == Vec.end() ? (T*)0 : Vec.begin()),
> +    : Data(Vec.begin() == Vec.end() ? (T*)nullptr : Vec.begin()),
>        Length(Vec.size()) {}
>
>      /// Construct an ArrayRef<const T*> from ArrayRef<T*>. This uses
> SFINAE to
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150723/4b569d83/attachment.html>


More information about the llvm-commits mailing list