[PATCH] implement a -Wformat-pedantic warning

Seth Cantrell seth.cantrell at gmail.com
Thu Feb 26 16:01:30 PST 2015


This enables a warning corresponding to gcc's warning of using %p modifiers with non-void* pointers, and to the printf/scanf specs which require void*.

The warning is on by default for -Weverything users, off by default for others. It can be enabled with -pedantic or -Wformat-pedantic. It's not enabled by -Wformat.

The patch includes tests and the clang-test target passes with this patch applied to a recent clang revision.

I used clang-format to format my changes and the patch includes cleanup of a few trailing whitespace issues that were near my changes.

See also the email thread at: http://lists.cs.uiuc.edu/pipermail/cfe-dev/2015-February/041714.html

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-a-format-warning-for-p-with-non-void-args.patch
Type: application/octet-stream
Size: 12576 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150226/d7addf54/attachment.obj>


More information about the cfe-commits mailing list