On Thu, Feb 26, 2015 at 4:01 PM, Seth Cantrell <[email protected]> wrote:
> 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. > >From a high level, this seems like a good approach to the problem, thanks. > 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 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?
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
