<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Feb 26, 2015 at 4:01 PM, Seth Cantrell <span dir="ltr"><<a href="mailto:seth.cantrell@gmail.com" target="_blank">seth.cantrell@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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*.<br>
<br>
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.<br></blockquote><div><br></div><div>From a high level, this seems like a good approach to the problem, thanks.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The patch includes tests and the clang-test target passes with this patch applied to a recent clang revision.<br>
<br>
I used clang-format to format my changes and the patch includes cleanup of a few trailing whitespace issues that were near my changes.<br>
<br>
See also the email thread at: <a href="http://lists.cs.uiuc.edu/pipermail/cfe-dev/2015-February/041714.html" target="_blank">http://lists.cs.uiuc.edu/pipermail/cfe-dev/2015-February/041714.html</a></blockquote><div><br></div><div>It doesn't seem ideal to call matchesType twice to find out which diagnostic to issue; have you considered returning an enum { Match, NoMatchPedantic, NoMatch }; or similar instead?</div></div></div></div>