[PATCH] D138727: [clang] Skip defaulted functions in zero-as-null-pointer-constant.

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 28 09:03:09 PST 2022


ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.

LGTM with a few NITs. Thanks!



================
Comment at: clang/lib/Sema/Sema.cpp:600
 
+  // Ignore null pointers in defaulted functions, e.g. defaulted comparison
+  // operators.
----------------
NIT: maybe even shorten to "ignore in defaulted comparison operators"


================
Comment at: clang/test/SemaCXX/warn-zero-nullptr-cxx20.cpp:3
+
+#include <warn-zero-nullptr.h>
+
----------------
NIT: I believe you don't need it as you don't use definitions like `NULL` or `SYSTEM_MACRO` from this header.
Similarly, `-isystem %S/Inputs` is not required.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138727/new/

https://reviews.llvm.org/D138727



More information about the cfe-commits mailing list