[Mlir-commits] [mlir] 377af86 - MLIR: Add --fix-error to clang-tidy script
Mehdi Amini
llvmlistbot at llvm.org
Thu Nov 17 22:23:12 PST 2022
Author: Mehdi Amini
Date: 2022-11-18T06:22:32Z
New Revision: 377af8684734ce1ca73bb81f3e559ff87a95f7fe
URL: https://github.com/llvm/llvm-project/commit/377af8684734ce1ca73bb81f3e559ff87a95f7fe
DIFF: https://github.com/llvm/llvm-project/commit/377af8684734ce1ca73bb81f3e559ff87a95f7fe.diff
LOG: MLIR: Add --fix-error to clang-tidy script
Added:
Modified:
mlir/utils/clang-tidy/apply-clang-tidy.sh
Removed:
################################################################################
diff --git a/mlir/utils/clang-tidy/apply-clang-tidy.sh b/mlir/utils/clang-tidy/apply-clang-tidy.sh
index 8266de8d6af22..a3592187361ef 100755
--- a/mlir/utils/clang-tidy/apply-clang-tidy.sh
+++ b/mlir/utils/clang-tidy/apply-clang-tidy.sh
@@ -72,8 +72,8 @@ find $SRCS | grep ".cpp$" | sort | while read file ; do
echo "-----------------------------------"
echo "-- Apply all checks on file $file"
- echo "$TIMING_TIDY $CLANG_TIDY -p $BUILD_DIR $file -fix"
- $TIMING_TIDY $CLANG_TIDY -p $BUILD_DIR $file -fix \
+ echo "$TIMING_TIDY $CLANG_TIDY -p $BUILD_DIR $file -fix -fix-errors"
+ $TIMING_TIDY $CLANG_TIDY -p $BUILD_DIR $file -fix -fix-errors \
| grep "warning:.*\]$" | sed -r 's#.*\[(.*)]$#\1#' | sort -u > $tmpfile
git clang-format -f
if [[ $(git
diff --stat) == '' ]]; then
@@ -89,8 +89,8 @@ find $SRCS | grep ".cpp$" | sort | while read file ; do
echo "-----------------------------------"
echo "-- Apply check $check on file $file"
- echo "$TIMING_TIDY $CLANG_TIDY -p $BUILD_DIR $file --checks="-*,$check" -fix"
- { $TIMING_TIDY $CLANG_TIDY -p $BUILD_DIR $file --checks="-*,$check" -fix ; } 2>&1
+ echo "$TIMING_TIDY $CLANG_TIDY -p $BUILD_DIR $file --checks="-*,$check" -fix -fix-errors"
+ { $TIMING_TIDY $CLANG_TIDY -p $BUILD_DIR $file --checks="-*,$check" -fix -fix-errors ; } 2>&1
git clang-format -f
if [[ $(git
diff --stat) == '' ]]; then
echo 'Nothing was applied, skip'
More information about the Mlir-commits
mailing list