[cfe-commits] [Patch] -Wformat: better handling of qualifiers on pointer arguments

Jordan Rose jordan_rose at apple.com
Tue Jul 31 08:23:29 PDT 2012

Wow, nice idea. I would add "const volatile" to your test cases as well, even though I'm pretty sure "removeLocalVolatile" does the right thing.

(Also, typedefs? Or have we already canonicalized the type by this point?)

On Jul 31, 2012, at 3:25 AM, Hans Wennborg <hans at chromium.org> wrote:

> Hi all,
> The attached patch makes Clang warn about passing in pointers to
> const-qualified types to scanf, such as passing in "const int*" for a
> "%d" format string.
> It also ignores the volatile-qualifier, allowing to pass in a
> "volatile int*" pointer for a "%n" format string.
> Please take a look!
> Thanks,
> Hans
> <wformat_type_qualifiers.patch>_______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

More information about the cfe-commits mailing list