forked from OSchip/llvm-project
[clang-tidy] forward arguments of the testing script to clang-tidy.
llvm-svn: 214952
This commit is contained in:
parent
5ec912881f
commit
6fd227c9ad
|
@ -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 $?
|
||||
|
|
Loading…
Reference in New Issue