[cfe-commits] r130335 - /cfe/trunk/lib/Analysis/PrintfFormatString.cpp
Ted Kremenek
kremenek at apple.com
Wed Apr 27 15:28:59 PDT 2011
On Apr 27, 2011, at 3:15 PM, Douglas Gregor wrote:
>
> On Apr 27, 2011, at 3:06 PM, Eli Friedman wrote:
>
>> Author: efriedma
>> Date: Wed Apr 27 17:06:20 2011
>> New Revision: 130335
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=130335&view=rev
>> Log:
>> Don't print fixits for format specifiers in cases where the fixit does not actually fix the warning. PR8781.
>>
>> I'm not sure what the preferred way to write a test for whether a fixit is emitted.
>
> 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.
>
> - Doug
There is a test specifically for format string checking:
test/Sema/format-strings-fixit.c
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110427/fe077ac0/attachment.html>
More information about the cfe-commits
mailing list