diff options
| author | Alexander Kornienko <alexfh@google.com> | 2015-03-04 12:07:50 +0000 |
|---|---|---|
| committer | Alexander Kornienko <alexfh@google.com> | 2015-03-04 12:07:50 +0000 |
| commit | ad53695a09f34fa2578b43227ec5d06fb9915174 (patch) | |
| tree | bcec7536fdb1fb547ff88264f33c784aa6ca37fd | |
| parent | 41204d09604ed075a6054865f6506f08db530633 (diff) | |
| download | bcm5719-llvm-ad53695a09f34fa2578b43227ec5d06fb9915174.tar.gz bcm5719-llvm-ad53695a09f34fa2578b43227ec5d06fb9915174.zip | |
[clang-tidy] Output more diagnostics in check_clang_tidy.sh
Print clang-tidy output and fixes applied.
llvm-svn: 231236
| -rwxr-xr-x | clang-tools-extra/test/clang-tidy/check_clang_tidy.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang-tools-extra/test/clang-tidy/check_clang_tidy.sh b/clang-tools-extra/test/clang-tidy/check_clang_tidy.sh index 0904d0da2df..817e3a2c64f 100755 --- a/clang-tools-extra/test/clang-tidy/check_clang_tidy.sh +++ b/clang-tools-extra/test/clang-tidy/check_clang_tidy.sh @@ -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 |

