[clang-tools-extra] r213739 - check_clang_tidy_fix.sh: Fail immediately if clang-tidy crashes.

Benjamin Kramer benny.kra at googlemail.com
Wed Jul 23 04:49:49 PDT 2014


Author: d0k
Date: Wed Jul 23 06:49:49 2014
New Revision: 213739

URL: http://llvm.org/viewvc/llvm-project?rev=213739&view=rev
Log:
check_clang_tidy_fix.sh: Fail immediately if clang-tidy crashes.

Otherwise we'll get confusing messages from FileCheck instead of seeing the real issue.

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=213739&r1=213738&r2=213739&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 Jul 23 06:49:49 2014
@@ -12,7 +12,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
+  > ${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