[cfe-commits] r148324 - in /cfe/trunk: include/clang/Sema/Sema.h lib/Sema/SemaChecking.cpp lib/Sema/SemaExprObjC.cpp test/SemaObjC/format-strings-objc.m

Chris Lattner clattner at apple.com
Tue Jan 31 12:48:11 PST 2012


On Jan 31, 2012, at 7:23 AM, Hans Wennborg wrote:

> On Mon, Jan 30, 2012 at 6:50 PM, Jean-Daniel Dupas
> <devlists at shadowlab.org> wrote:
>>>> ../../webkit/plugins/npapi/plugin_web_event_converter_mac.mm:213:37:
>>>> error: format specifies type 'wchar_t *' (aka 'wchar_t *') but the
>>> 
>>> Unrelated to the root issue, but why are we aka'ing to the same type?
>>> 
>>> -Chris
>> 
>> 
>> 
>> Because the FormatString checker build the type description itself (instead of using diagnostic facility, see FormatString.cpp:374), probably to get a type that match as much as possible the type defined in printf/scanf manual, and it look like it is not smart enough to detect when the underlying type need aka, or not.
> 
> Right, I didn't take into account that wchar_t is a built-in type in
> some languages.
> 
> r149387

Very nice, thanks!

-Chris




More information about the cfe-commits mailing list