[PATCH] Allow users to specify NULL like macros to be replaced
Tareq A. Siraj
tareq.a.siraj at intel.com
Tue Mar 26 13:33:21 PDT 2013
PR15602 created for enhancement. Updated patch coming up.
================
Comment at: cpp11-migrate/UseNullptr/NullptrActions.cpp:31
@@ -30,1 +30,3 @@
+const char NullMacroName[] = "NULL";
+
----------------
Edwin Vane wrote:
> Style nit: use const char *NullMacroName = "NULL".
Done.
================
Comment at: cpp11-migrate/UseNullptr/NullptrActions.cpp:36
@@ +35,3 @@
+ llvm::cl::desc("User defined macro names (separated by "
+ "comma) to migrate that behave like NULL"),
+ llvm::cl::init(""));
----------------
Edwin Vane wrote:
> Perhaps "Comma-separated list of user-defined macro names that behave like NULL".
Done.
================
Comment at: docs/UseNullptrTransform.rst:48
@@ +47,3 @@
+user defined macros that behaves like ``NULL``. The user can use the
+:option:`-user-null-macros` option to specify a comma separated list of macro
+names that will be transformed along with ``NULL``.
----------------
Edwin Vane wrote:
> comma-separated
Done.
================
Comment at: docs/UseNullptrTransform.rst:56
@@ +55,3 @@
+
+ #define MY_NULL NULL
+ void assignment() {
----------------
Edwin Vane wrote:
> It might be more clear to do something more user-specific like we've seen in ITK:
>
> #define MY_NULL (void*)0
Done.
================
Comment at: docs/cpp11-migrate.rst:45
@@ +44,3 @@
+
+ ``<string>`` is a comma separated list of user supplied macro names that
+ behave like the ``NULL`` macro. The :option:`-use-nullptr` transform will
----------------
Edwin Vane wrote:
> ...is a comma-separated list of user-defined macros that...
Done.
http://llvm-reviews.chandlerc.com/D574
More information about the cfe-commits
mailing list