[cfe-commits] [Patch] -Wformat: better handling of qualifiers on pointer arguments
hans at chromium.org
Tue Jul 31 08:57:42 PDT 2012
I've added some tests for the "const volatile" case. Yes, the types
have already been canonicalized, but I've added a couple of tests for
New patch attached. OK to commit?
On Tue, Jul 31, 2012 at 4:23 PM, Jordan Rose <jordan_rose at apple.com> wrote:
> 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!
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4363 bytes
Desc: not available
More information about the cfe-commits