[Diffusion] rL302247: Introduce Wzero-as-null-pointer-constant.

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Sep 16 06:26:56 PDT 2017


lebedev.ri added subscribers: thakis, cfe-commits, dblaikie, malcolm.parsons, hans, lebedev.ri.
lebedev.ri raised a concern with this commit.
lebedev.ri added a comment.

Hi @thakis!
Are you planning on addressing the kind-of false-positives this diagnostic produces?
It should not warn if `0` is:

- From system header
- From macro, especially if it is defined in a system header
- Is used as an initializer for dependent variable (`template <typename T> void fun(T var = 0)` should not warn)

Refs. https://bugs.llvm.org/show_bug.cgi?id=33771
Refs. https://reviews.llvm.org/D32914


Users:
  lebedev.ri (Auditor)

https://reviews.llvm.org/rL302247





More information about the cfe-commits mailing list