[PATCH] D37042: Teach clang to tolerate the 'p = nullptr + n' idiom used by glibc
Eli Friedman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 13 13:08:20 PDT 2017
efriedma added inline comments.
================
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:6031
InGroup<PointerArith>;
+def ext_gnu_null_ptr_arith : Extension<
+ "arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension">,
----------------
"extension" isn't really right here; this shouldn't be an error in -pedantic-errors mode. Probably best to just stick this into the NullPointerArithmetic, like the other new warning.
https://reviews.llvm.org/D37042
More information about the cfe-commits
mailing list