[PATCH] Added comprehensive macro arg usage logic to Use-Nullptr Transform

Edwin Vane edwin.vane at intel.com
Wed May 1 12:04:22 PDT 2013


Hi klimek, gribozavr, doug.gregor,

If a NullTo(Member)Pointer cast results from a macro arg expansion, all
uses of the arg must result in such casts or else the macro arg cannot
be replaced with 'nullptr' safely. This revision adds logic and tests to
ensure the safety of replacing macro args in the Use-Nullptr Transform.

Fixes: PR15816

Note to Reviewers: I'd appreciate any feedback on my use of SourceLocations
and navigating macro expansion records. I had some trouble wrapping my head
around macro expansions and although the tests pass, my mental model may not be
correct.

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

Files:
  cpp11-migrate/UseNullptr/NullptrActions.cpp
  test/cpp11-migrate/UseNullptr/macros.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D732.1.patch
Type: text/x-patch
Size: 21936 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130501/5d9ca88f/attachment.bin>


More information about the cfe-commits mailing list