Reformat Source: Support future versions of LLVM
@@ -14,7 +14,7 @@ CLANG_FORMAT=$(which clang-format-$MIN_VERSION.0 || which clang-format)
if [ -n "$CLANG_FORMAT" ]; then
location="$CLANG_FORMAT"
version=$("$CLANG_FORMAT" --version 2> /dev/null)
- majorVersion=$(printf '%s' "$version" | sed -E 's/.* ([6-9]+)\.[0-9].[0-9][ -].*/\1/')
+ majorVersion=$(printf '%s' "$version" | sed -E 's/.* ([0-9]+)\.[0-9].[0-9][ -].*/\1/')
[ "$majorVersion" -ge $MIN_VERSION ] 2> /dev/null || unset CLANG_FORMAT
fi
