Re: PSA: Please stop using NULL in C++ code

2014-01-06 Thread Joshua Cranmer 🐧
On 1/6/2014 12:20 PM, Gregory Szorc wrote: On 1/6/14, 7:12 AM, Ehsan Akhgari wrote: With Birunthan's restless efforts in bug 784739, we have finally removed the usage of NULL in our C++ code. Please stop using NULL in new C++ code, and use nullptr instead! Can we update the Clang plugin to

Re: PSA: Please stop using NULL in C++ code

2014-01-06 Thread Ehsan Akhgari
On 1/6/2014, 2:56 PM, Chris Peterson wrote: On 1/6/14, 11:37 AM, Gregory Szorc wrote: Both are probably good clang-analyser plugins to write. http://clang-analyzer.llvm.org/ True. Although I don't believe we run clang-analyzer in automation... yet. I don't think the benefit of replacing NULL

Re: PSA: Please stop using NULL in C++ code

2014-01-06 Thread Ehsan Akhgari
On 1/6/2014, 2:37 PM, Gregory Szorc wrote: On 1/6/14, 11:32 AM, Martin Thomson wrote: On 2014-01-06, at 11:25, Gregory Szorc wrote: Clang provides access to the low-level token stream [1]. This is available via libclang (the C API) and the Python bindings and I'm pretty sure you can access t

Re: PSA: Please stop using NULL in C++ code

2014-01-06 Thread Chris Peterson
On 1/6/14, 11:37 AM, Gregory Szorc wrote: Both are probably good clang-analyser plugins to write. http://clang-analyzer.llvm.org/ True. Although I don't believe we run clang-analyzer in automation... yet. I don't think the benefit of replacing NULL with nullptr is worth the developer and inf

Re: PSA: Please stop using NULL in C++ code

2014-01-06 Thread Gregory Szorc
On 1/6/14, 11:32 AM, Martin Thomson wrote: On 2014-01-06, at 11:25, Gregory Szorc wrote: Clang provides access to the low-level token stream [1]. This is available via libclang (the C API) and the Python bindings and I'm pretty sure you can access this info from plugins. Each token is asso

Re: PSA: Please stop using NULL in C++ code

2014-01-06 Thread Martin Thomson
On 2014-01-06, at 11:25, Gregory Szorc wrote: > Clang provides access to the low-level token stream [1]. This is available > via libclang (the C API) and the Python bindings and I'm pretty sure you can > access this info from plugins. > > Each token is associated with a source location (file,

Re: PSA: Please stop using NULL in C++ code

2014-01-06 Thread Gregory Szorc
On 1/6/14, 10:54 AM, Trevor Saunders wrote: On Mon, Jan 06, 2014 at 01:35:38PM -0500, Ehsan Akhgari wrote: On 1/6/2014, 1:20 PM, Gregory Szorc wrote: On 1/6/14, 7:12 AM, Ehsan Akhgari wrote: With Birunthan's restless efforts in bug 784739, we have finally removed the usage of NULL in our C++ c

Re: PSA: Please stop using NULL in C++ code

2014-01-06 Thread Trevor Saunders
On Mon, Jan 06, 2014 at 01:35:38PM -0500, Ehsan Akhgari wrote: > On 1/6/2014, 1:20 PM, Gregory Szorc wrote: > >On 1/6/14, 7:12 AM, Ehsan Akhgari wrote: > >>With Birunthan's restless efforts in bug 784739, we have finally removed > >>the usage of NULL in our C++ code. Please stop using NULL in new

Re: PSA: Please stop using NULL in C++ code

2014-01-06 Thread Ehsan Akhgari
On 1/6/2014, 1:20 PM, Gregory Szorc wrote: On 1/6/14, 7:12 AM, Ehsan Akhgari wrote: With Birunthan's restless efforts in bug 784739, we have finally removed the usage of NULL in our C++ code. Please stop using NULL in new C++ code, and use nullptr instead! Can we update the Clang plugin to em

Re: PSA: Please stop using NULL in C++ code

2014-01-06 Thread Gregory Szorc
On 1/6/14, 7:12 AM, Ehsan Akhgari wrote: With Birunthan's restless efforts in bug 784739, we have finally removed the usage of NULL in our C++ code. Please stop using NULL in new C++ code, and use nullptr instead! Can we update the Clang plugin to emit an error (and turn the tree red) if a NU

Re: PSA: Please stop using NULL in C++ code

2014-01-06 Thread Ehsan Akhgari
On 1/6/2014, 12:16 PM, Jim Chen wrote: We also use NULL when generating JNI-interfacing code; I don't know if the patches in bug 784739 already cover these cases. [1] http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/jni-generator.py [2] http://mxr.mozilla.org/mozilla-central/sou

Re: PSA: Please stop using NULL in C++ code

2014-01-06 Thread Jim Chen
We also use NULL when generating JNI-interfacing code; I don't know if the patches in bug 784739 already cover these cases. [1] http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/jni-generator.py [2] http://mxr.mozilla.org/mozilla-central/source/build/annotationProcessors/CodeGenera

Re: PSA: Please stop using NULL in C++ code

2014-01-06 Thread Gavin Sharp
Seems like it would be a good idea to update https://developer.mozilla.org/en-US/docs/Developer_Guide/Coding_Style#C.2FC.2B.2B_practices accordingly. Gavin On Mon, Jan 6, 2014 at 10:12 AM, Ehsan Akhgari wrote: > With Birunthan's restless efforts in bug 784739, we have finally removed > the usage

Re: PSA: Please stop using NULL in C++ code

2014-01-06 Thread Ehsan Akhgari
On 1/6/2014, 11:19 AM, Gavin Sharp wrote: Seems like it would be a good idea to update https://developer.mozilla.org/en-US/docs/Developer_Guide/Coding_Style#C.2FC.2B.2B_practices accordingly. Good point, done! Cheers, Ehsan ___ dev-platform mailing

PSA: Please stop using NULL in C++ code

2014-01-06 Thread Ehsan Akhgari
With Birunthan's restless efforts in bug 784739, we have finally removed the usage of NULL in our C++ code. Please stop using NULL in new C++ code, and use nullptr instead! Cheers, -- Ehsan ___ dev-platform mailing list dev-pl