[PATCH] D38954: [Sema] -Wzero-as-null-pointer-constant: don't warn for system macros other than NULL.

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 25 11:11:00 PDT 2017


lebedev.ri updated this revision to Diff 120285.
lebedev.ri added a comment.

- Rebased
- Handle `-Wsystem-headers` properly, as per irc disscussion.

It was suggested that `findMacroSpelling()` might be slow, and `isNullPointerConstant()` should be used, but i'm not sure any of the `NullPointerConstantKind`'s can replace direct check for `NULL` specifically...


Repository:
  rL LLVM

https://reviews.llvm.org/D38954

Files:
  docs/ReleaseNotes.rst
  lib/Sema/Sema.cpp
  test/SemaCXX/Inputs/warn-zero-nullptr.h
  test/SemaCXX/warn-zero-nullptr.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38954.120285.patch
Type: text/x-patch
Size: 5309 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171025/4ad45382/attachment.bin>


More information about the cfe-commits mailing list