[cfe-commits] r157219 - /cfe/trunk/utils/analyzer/reducer.pl

Ted Kremenek kremenek at apple.com
Mon May 21 17:38:19 PDT 2012


On May 21, 2012, at 5:31 PM, Nick Lewycky <nlewycky at google.com> wrote:

> +my \$found = 0;
> +while(<IN>) {
> +  if (/$magic/) { exit \$GOOD; }
> +}
> +exit \$BAD;
> +ENDTEXT
> +close(OUT);
> +`chmod +x $scriptFile`;
> +
> +print "$prog: starting reduction\n";
> +sub multidelta {
> +    my $level = shift @_;
> 
> I really like that you pass -w and say "use strict;" but I'd also like if you used function prototypes too:
> 
> sub multidelta($) {
>   my ($level) = @_;
> 
> and not using "shift" does a better job of indicating that you aren't expecting more than one item on @_
> 
> Nick

Thanks.  My Perl-foo is ancient from my grad school days.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120521/f03bab2c/attachment.html>


More information about the cfe-commits mailing list