<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Apr 27, 2011, at 3:15 PM, Douglas Gregor wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><br>On Apr 27, 2011, at 3:06 PM, Eli Friedman wrote:<br><br><blockquote type="cite">Author: efriedma<br></blockquote><blockquote type="cite">Date: Wed Apr 27 17:06:20 2011<br></blockquote><blockquote type="cite">New Revision: 130335<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project?rev=130335&view=rev">http://llvm.org/viewvc/llvm-project?rev=130335&view=rev</a><br></blockquote><blockquote type="cite">Log:<br></blockquote><blockquote type="cite">Don't print fixits for format specifiers in cases where the fixit does not actually fix the warning. PR8781.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I'm not sure what the preferred way to write a test for whether a fixit is emitted.<br></blockquote><br>Check out the tests in test/FixIt. Basically, we do a -verify check first. Then, we copy the source file to another file, run clang -cc1 in "-fixit" mode to apply the fix-its in place, and then check that the file syntax-checks without any more errors.<br><br><span class="Apple-tab-span" style="white-space: pre; ">       </span>- Doug<br></span></blockquote></div><br><div>There is a test specifically for format string checking:</div><div><br></div><div><div>test/Sema/format-strings-fixit.c</div></div><div><br></div></body></html>