summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/scripts
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2015-01-16 10:09:56 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2015-01-16 10:09:56 +0000
commit28b40caf55afdba9cb6b717551752172099eacf6 (patch)
tree9c4e2dfb35a56bb8de5412a58808942b7441ce3a /lib/sanitizer_common/scripts
parent114bd48979acc6444e976c1b090ad2d58bfeb7ab (diff)
[sanitizer] Cleanup linter temporary files.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@226266 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/scripts')
-rwxr-xr-xlib/sanitizer_common/scripts/check_lint.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/sanitizer_common/scripts/check_lint.sh b/lib/sanitizer_common/scripts/check_lint.sh
index 267273d97..dc7bb145b 100755
--- a/lib/sanitizer_common/scripts/check_lint.sh
+++ b/lib/sanitizer_common/scripts/check_lint.sh
@@ -32,7 +32,14 @@ LSAN_LIT_TEST_LINT_FILTER=${LSAN_RTL_LINT_FILTER},-whitespace/line_length
DFSAN_RTL_LINT_FILTER=${COMMON_LINT_FILTER},-runtime/int,-runtime/printf,-runtime/references,-readability/function
COMMON_RTL_INC_LINT_FILTER=${COMMON_LINT_FILTER},-runtime/int,-runtime/sizeof,-runtime/printf,-readability/fn_size
SANITIZER_INCLUDES_LINT_FILTER=${COMMON_LINT_FILTER},-runtime/int
-MKTEMP="mktemp -q /tmp/tmp.XXXXXXXXXX"
+
+MKTEMP_DIR=$(mktemp -qd /tmp/check_lint.XXXXXXXXXX)
+MKTEMP="mktemp -q ${MKTEMP_DIR}/tmp.XXXXXXXXXX"
+function cleanup {
+ rm -rf $MKTEMP_DIR
+}
+trap cleanup EXIT
+
cd ${LLVM_CHECKOUT}
EXITSTATUS=0