hanchenye-llvm-project/polly/utils/update_format.sh

17 lines
291 B
Bash
Executable File

#!/bin/bash
CLANG_FORMAT=${CLANG_FORMAT}
if [ "${CLANG_FORMAT}x" = "x" ]; then
CLANG_FORMAT=`which clang-format`
if [ "${CLANG_FORMAT}x" = "x" ]; then
echo "Error: cannot find clang-format in your path"
exit 1
fi
fi
for ARG in "$@"
do
${CLANG_FORMAT} -i $ARG
done