LGTM, but maybe Doug or Ted should comment on whether this is actually the behavior we want.<div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jul 27, 2012 at 6:17 AM, Hans Wennborg <span dir="ltr"><<a href="mailto:hans@chromium.org" target="_blank">hans@chromium.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<br>
Clang's -Wformat fix-its currently suggest using "%zu" for values of<br>
type size_t (in C99 and C++11).<br>
<br>
However, for a type such as std::vector<T>::size_type, it doesn't<br>
notice that this is typedeffed to size_t, and therefore it doesn't<br>
suggest "%zu", but rather "%u" or "%lu".<br>
<br>
The attached patch makes the printf/scanf fix-up mechanism walk the<br>
typedef chain, so that it notices if the type is size_t, even if that<br>
isn't "at the top".<br>
<br>
Please take a look.<br>
<br>
Thanks,<br>
Hans<br>
<br>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br></div>