[gdal-dev] Mass-conversion from NULL to nullptr ready to land

Even Rouault even.rouault at spatialys.com
Mon Dec 11 11:09:22 PST 2017


> As this is a rather painful exercice (1146 files changed) which is very
> fragile to concurrent changes, I'd like to drop this in trunk ASAP if
> there's no opposition.
> 

I've just committed the changes (with more triggered by clang 5.0, which
catches more things)

Thanks Mateusz for the pointer to https://github.com/rizsotto/Bear . From a
quick try, this works. However, in case others want to make a try with it,
I got crashes of clang-tidy from Ubuntu 16.04 when making it work on the
json compile database, whereas in manual mode it worked. I solved that
by using binaries of clang 5.0 instead.

Recipee:
(clean or touch files you want to edit with clang-tidy)
bear make
clang-tidy -checks='-*,modernize-use-nullptr' -p=compile_commands.json -fix port/cpl_string.cpp

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20171211/cfe70355/attachment.html>


More information about the gdal-dev mailing list