[clang-tools-extra] r212546 - Use explicit if and restore lost FileCheck error code checking.

Benjamin Kramer benny.kra at googlemail.com
Tue Jul 8 09:15:49 PDT 2014


Author: d0k
Date: Tue Jul  8 11:15:48 2014
New Revision: 212546

URL: http://llvm.org/viewvc/llvm-project?rev=212546&view=rev
Log:
Use explicit if and restore lost FileCheck error code checking.

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=212546&r1=212545&r2=212546&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 Tue Jul  8 11:15:48 2014
@@ -8,5 +8,7 @@ TEMPORARY_FILE=$3.cpp
 
 grep -Ev "// *[A-Z-]+:" ${INPUT_FILE} > ${TEMPORARY_FILE}
 clang-tidy ${TEMPORARY_FILE} -fix --checks="-*,${CHECK_TO_RUN}" -- --std=c++11 > ${TEMPORARY_FILE}.msg 2>&1
-FileCheck -input-file=${TEMPORARY_FILE} ${INPUT_FILE} -strict-whitespace
-not grep CHECK-MESSAGES ${INPUT_FILE} || FileCheck -input-file=${TEMPORARY_FILE}.msg ${INPUT_FILE} -check-prefix=CHECK-MESSAGES
+FileCheck -input-file=${TEMPORARY_FILE} ${INPUT_FILE} -strict-whitespace || exit $?
+if grep CHECK-MESSAGES ${INPUT_FILE}; then
+  FileCheck -input-file=${TEMPORARY_FILE}.msg ${INPUT_FILE} -check-prefix=CHECK-MESSAGES || exit $?
+fi





More information about the cfe-commits mailing list