[cfe-commits] [PATCH] Tighten up -Wliteral-conversion

Matt Beaumont-Gay matthewbg at google.com
Tue Oct 4 18:05:17 PDT 2011


This patch changes -Wliteral-conversion to only warn when the
conversion would result in losing information. Previously, the warning
had a high noise level in code that makes extensive use of literals
like "123e6". Now, it catches exactly the bugs it was originally
intended for, e.g. "const int kFooPercentage = 5e-2" or "sleep(0.1)".

-Matt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tighten_literal_conversion.patch
Type: text/x-patch
Size: 6423 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20111004/388ed1ed/attachment.bin>


More information about the cfe-commits mailing list