[cfe-commits] r130335 - /cfe/trunk/lib/Analysis/PrintfFormatString.cpp

Eli Friedman eli.friedman at gmail.com
Wed Apr 27 15:19:09 PDT 2011


On Wed, Apr 27, 2011 at 3:15 PM, Douglas Gregor <dgregor at apple.com> 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.

In this case, I need to check that a fixit is *not* emitted. :)

-Eli



More information about the cfe-commits mailing list