[PATCH] Don't replace macro usage if macro body has NULL

Tareq A. Siraj tareq.a.siraj at intel.com
Wed Mar 20 09:16:31 PDT 2013



================
Comment at: cpp11-migrate/UseNullptr/NullptrActions.cpp:125
@@ +124,3 @@
+    // coming from a macro called NULL.
+    if (SM.isMacroArgExpansion(StartLoc) && SM.isMacroArgExpansion(EndLoc)) {
+      StartLoc = SM.getFileLoc(StartLoc);
----------------
Manuel Klimek wrote:
> I assume we don't care that those can both be true, but start and end can still be produced from different macro expansions? Or do we check that somewhere else?
Can you provide an example for start/end coming from different macro expansions in case of ImplicitCastNodes? I don't think we do this check but is it really necessary for ImplicitCastNodes? Thanks.


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



More information about the cfe-commits mailing list