[cfe-commits] [PATCH] Added use-nullptr transform into cpp11-migrate tool

Dmitri Gribenko gribozavr at gmail.com
Wed Jan 16 12:22:12 PST 2013



================
Comment at: cpp11-migrate/UseNullptr/NullptrActions.cpp:33-35
@@ +32,5 @@
+/// (i.e. it has no explicit casts as an ancestor) where an implicit cast is
+/// nested within. However, there is no guarantee that only explicit casts
+/// exist between the found top-most explicit cast and the possibly more than
+/// one nested implicit cast. This visitor finds all cast sequences with an
+/// implicit cast to null within and creates a replacement.
----------------
Tareq A. Siraj wrote:
> Dmitri Gribenko wrote:
> > Please add negative tests for these cases.
> This should be covered by the test in basic.cpp:78-79. Did you have anything else in mind? Thanks.
> 
> `m_p = static_cast<T*>(p ? p : static_cast<void*>(g_null));`
> `// CHECK: m_p = static_cast<T*>(p ? p : nullptr);`
> 
> I've addressed the other comments and will wait till this one is resolved before uploading the new patch.
It is indeed covered by that.  Sorry for the noise.



http://llvm-reviews.chandlerc.com/D295



More information about the cfe-commits mailing list