[clang-tidy] forward arguments of the testing script to clang-tidy.

llvm-svn: 214952
This commit is contained in:
Benjamin Kramer 2014-08-06 08:19:30 +00:00
parent 5ec912881f
commit 6fd227c9ad
1 changed files with 2 additions and 1 deletions

View File

@ -5,6 +5,7 @@
INPUT_FILE=$1
CHECK_TO_RUN=$2
TEMPORARY_FILE=$3.cpp
shift 3
# Remove the contents of the CHECK lines to avoid CHECKs matching on themselves.
# We need to keep the comments to preserve line numbers while avoiding empty
@ -12,7 +13,7 @@ TEMPORARY_FILE=$3.cpp
sed 's#// *[A-Z-]\+:.*#//#' ${INPUT_FILE} > ${TEMPORARY_FILE}
clang-tidy ${TEMPORARY_FILE} -fix --checks="-*,${CHECK_TO_RUN}" -- --std=c++11 \
> ${TEMPORARY_FILE}.msg 2>&1 || exit $?
$* > ${TEMPORARY_FILE}.msg 2>&1 || exit $?
FileCheck -input-file=${TEMPORARY_FILE} ${INPUT_FILE} \
-check-prefix=CHECK-FIXES -strict-whitespace || exit $?