[clang-tools-extra] r231236 - [clang-tidy] Output more diagnostics in check_clang_tidy.sh

Alexander Kornienko alexfh at google.com
Wed Mar 4 04:07:51 PST 2015


Author: alexfh
Date: Wed Mar  4 06:07:50 2015
New Revision: 231236

URL: http://llvm.org/viewvc/llvm-project?rev=231236&view=rev
Log:
[clang-tidy] Output more diagnostics in check_clang_tidy.sh

Print clang-tidy output and fixes applied.


Modified:
    clang-tools-extra/trunk/test/clang-tidy/check_clang_tidy.sh

Modified: clang-tools-extra/trunk/test/clang-tidy/check_clang_tidy.sh
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/check_clang_tidy.sh?rev=231236&r1=231235&r2=231236&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/check_clang_tidy.sh (original)
+++ clang-tools-extra/trunk/test/clang-tidy/check_clang_tidy.sh Wed Mar  4 06:07:50 2015
@@ -30,10 +30,19 @@ fi
 # We need to keep the comments to preserve line numbers while avoiding empty
 # lines which could potentially trigger formatting-related checks.
 sed 's#// *CHECK-[A-Z-]*:.*#//#' "${INPUT_FILE}" > "${TEMPORARY_FILE}"
+cp "${TEMPORARY_FILE}" "${TEMPORARY_FILE}.orig"
 
 clang-tidy "${TEMPORARY_FILE}" -fix --checks="-*,${CHECK_TO_RUN}" "$@" \
   > "${TEMPORARY_FILE}.msg" 2>&1
 
+echo "------------------------ clang-tidy output ------------------------"
+cat "${TEMPORARY_FILE}.msg"
+echo "-------------------------------------------------------------------"
+
+echo "------------------------------ Fixes ------------------------------"
+diff -u "${TEMPORARY_FILE}.orig" "${TEMPORARY_FILE}" || true
+echo "-------------------------------------------------------------------"
+
 if grep -q 'CHECK-FIXES' "${INPUT_FILE}"; then
   FileCheck -input-file="${TEMPORARY_FILE}" "${INPUT_FILE}" \
     -check-prefix=CHECK-FIXES -strict-whitespace





More information about the cfe-commits mailing list