[cfe-dev] A tool for generating reduced headers for test cases (delta debugging)

Ted Kremenek kremenek at apple.com
Wed Jul 9 14:35:27 PDT 2008


On Jul 9, 2008, at 9:46 AM, Ted Kremenek wrote:

>>> Being able to do so would make it possible to
>>> report bugs by using runnable test cases, and those test cases could
>>> be eventually included with the clang itself.
>
> I can certainly clean up the detect_error.pl script and post it the
> website with directions.

Here is my scripts to add to the pile.  Once must change the source  
file in "detect_error.pl" (this is the source that includes the header  
to be reduced) while "reduce.pl" takes as an argument the preprocessed  
header you want to reduce (this file is included by the source file).

Both scripts rely on the delta-debugging scripts being in your path.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: detect_error.pl
Type: text/x-perl-script
Size: 1323 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20080709/c6a0c392/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: reduce.pl
Type: text/x-perl-script
Size: 331 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20080709/c6a0c392/attachment-0001.bin>
-------------- next part --------------


I also saw that Nuno posted some scripts.  Hopefully from all these  
scripts you'll find something that works for you.  If these scripts  
prove useful, we should post them to the Clang website.


More information about the cfe-dev mailing list