This is an archive of the discontinued LLVM Phabricator instance.

Add the new -Wnull-pointer-arithmetic warnings to the release notes
ClosedPublic

Authored by sylvestre.ledru on Sep 22 2017, 12:41 PM.

Diff Detail

Event Timeline

hfinkel added inline comments.Sep 27 2017, 12:52 PM
ReleaseNotes.rst
82

We can probably just make this one entry:

``-Wnull-pointer-arithmetic`` now warns about performing pointer arithmetic on a null pointer. Such pointer arithmetic has an undefined behavior if the offset is nonzero. It also now warns about arithmetic on a null pointer treated as a cast from integer to pointer (GNU extension).
sylvestre.ledru accepted this revision.Sep 28 2017, 1:02 AM

Thanks, it makes sense!
Landed in r314387

This revision is now accepted and ready to land.Sep 28 2017, 1:02 AM
sylvestre.ledru marked an inline comment as done.