[clang-tools-extra] r214952 - [clang-tidy] forward arguments of the testing script to clang-tidy.
Benjamin Kramer
benny.kra at googlemail.com
Wed Aug 6 01:19:31 PDT 2014
Author: d0k
Date: Wed Aug 6 03:19:30 2014
New Revision: 214952
URL: http://llvm.org/viewvc/llvm-project?rev=214952&view=rev
Log:
[clang-tidy] forward arguments of the testing script to clang-tidy.
Modified:
clang-tools-extra/trunk/test/clang-tidy/check_clang_tidy_fix.sh
Modified: clang-tools-extra/trunk/test/clang-tidy/check_clang_tidy_fix.sh
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/check_clang_tidy_fix.sh?rev=214952&r1=214951&r2=214952&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/check_clang_tidy_fix.sh (original)
+++ clang-tools-extra/trunk/test/clang-tidy/check_clang_tidy_fix.sh Wed Aug 6 03:19:30 2014
@@ -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 $?
More information about the cfe-commits
mailing list