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

Mateusz Loskot mateusz at loskot.net
Sun Dec 10 06:24:03 PST 2017


On 10 Dec 2017 14:52, "Even Rouault" <even.rouault at spatialys.com> wrote:




(*) sed "s/NULL/nullptr/g" is not an option, as there is a significant
number of occurences of NULL being in a string (think to SQL statements).

clang-tidy works great, but as it does a true parsing of the code, you need
to pass it the same -D and -I switches as the compiler would take. I guess
there would perhaps be a way of creating a CXX script that could be used as
a fake compiler and would redirect to clang-tidy.


Even, best results clang-tidy delivers if used with clang compile database
(JSON file). Its easy to generate one with CMake, but that's obviously not
an (convenient) option for GDAL.

Have you tried Bear instead?
https://github.com/rizsotto/Bear

It can intercept compile commands from any build system on Linux.

Mateusz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20171210/482b7149/attachment.html>


More information about the gdal-dev mailing list