[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
Mon Oct 23 10:15:53 PDT 2017


lebedev.ri added inline comments.


================
Comment at: lib/Sema/Sema.cpp:445
+  // If it is a macro from system header, and if the macro name is not "NULL",
+  // do not warn.
+  SourceLocation MaybeMacroLoc = E->getLocStart();
----------------
Rakete1111 wrote:
> That comment doesn't really add anything IMO. It just says what the code just below says.
I don't disagree. It seems to be the common pattern for the code in this file.
Having both the code and the comment might help convey the idea better.


Repository:
  rL LLVM

https://reviews.llvm.org/D38954





More information about the cfe-commits mailing list