[cfe-commits] r130335 - /cfe/trunk/lib/Analysis/PrintfFormatString.cpp
Douglas Gregor
dgregor at apple.com
Wed Apr 27 15:23:10 PDT 2011
On Apr 27, 2011, at 3:19 PM, Eli Friedman wrote:
> 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. :)
Ick! Well, you could FileCheck or -verify the result of Clang running on the post- "-fixit" file's output. That's pretty painful :(
- Doug
More information about the cfe-commits
mailing list