diff --git a/clang/test/make_test_dirs.pl b/clang/test/make_test_dirs.pl --- a/clang/test/make_test_dirs.pl +++ b/clang/test/make_test_dirs.pl @@ -1,9 +1,10 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl # # Simple little Perl script that takes the cxx-sections.data file as # input and generates a directory structure that mimics the standard's # structure. use English; +use warnings; $current_indent_level = -4; while ($line = ) { diff --git a/clang/tools/scan-build/bin/set-xcode-analyzer b/clang/tools/scan-build/bin/set-xcode-analyzer --- a/clang/tools/scan-build/bin/set-xcode-analyzer +++ b/clang/tools/scan-build/bin/set-xcode-analyzer @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python # [PR 11661] Note that we hardwire to /usr/bin/python because we # want to the use the system version of Python on Mac OS X. diff --git a/clang/utils/TestUtils/pch-test.pl b/clang/utils/TestUtils/pch-test.pl --- a/clang/utils/TestUtils/pch-test.pl +++ b/clang/utils/TestUtils/pch-test.pl @@ -1,10 +1,11 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl # This tiny little script, which should be run from the clang # directory (with clang in your patch), tries to take each # compilable Clang test and build a PCH file from that test, then read # and dump the contents of the PCH file just created. use POSIX; +use warnings; $exitcode = 0; sub testfiles($$) { diff --git a/clang/utils/analyzer/reducer.pl b/clang/utils/analyzer/reducer.pl --- a/clang/utils/analyzer/reducer.pl +++ b/clang/utils/analyzer/reducer.pl @@ -1,5 +1,6 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl use strict; +use warnings; use File::Temp qw/ tempdir /; my $prog = "reducer"; @@ -31,8 +32,9 @@ my $commandStr = "@$command"; print OUT < # +use warnings; + # Give first option a name. my $Directory = $ARGV[0]; my $Symbol = $ARGV[1]; diff --git a/llvm/utils/llvm-compilers-check b/llvm/utils/llvm-compilers-check --- a/llvm/utils/llvm-compilers-check +++ b/llvm/utils/llvm-compilers-check @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 ##===- utils/llvmbuild - Build the LLVM project ----------------*-python-*-===## # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/llvm/utils/llvm-native-gxx b/llvm/utils/llvm-native-gxx --- a/llvm/utils/llvm-native-gxx +++ b/llvm/utils/llvm-native-gxx @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl # Wrapper around LLVM tools to generate a native .o from llvm-gxx using an # LLVM back-end (CBE by default). diff --git a/openmp/runtime/tools/check-execstack.pl b/openmp/runtime/tools/check-execstack.pl --- a/openmp/runtime/tools/check-execstack.pl +++ b/openmp/runtime/tools/check-execstack.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl # #//===----------------------------------------------------------------------===// diff --git a/openmp/runtime/tools/check-instruction-set.pl b/openmp/runtime/tools/check-instruction-set.pl --- a/openmp/runtime/tools/check-instruction-set.pl +++ b/openmp/runtime/tools/check-instruction-set.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl # #//===----------------------------------------------------------------------===// diff --git a/openmp/runtime/tools/message-converter.pl b/openmp/runtime/tools/message-converter.pl --- a/openmp/runtime/tools/message-converter.pl +++ b/openmp/runtime/tools/message-converter.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl # #//===----------------------------------------------------------------------===// diff --git a/polly/lib/External/isl/doc/mypod2latex b/polly/lib/External/isl/doc/mypod2latex --- a/polly/lib/External/isl/doc/mypod2latex +++ b/polly/lib/External/isl/doc/mypod2latex @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl use strict; use Pod::LaTeX;