[libc++] Fix the check-format job

Previously, it wouldn't take into account files in ignore_format.txt
(at least not on OSX) because the `find` command would return file names
like `libcxx/src//new_handler.cpp`, which never matched the file names
in `ignore_format.txt`.

Differential Revision: https://reviews.llvm.org/D153416
This commit is contained in:
Louis Dionne 2023-06-21 09:08:45 -04:00
parent 3858e9d6c5
commit b356928058

@ -198,7 +198,7 @@ check-format)
${GIT_CLANG_FORMAT} \
--diff \
--extensions ',h,hpp,c,cpp,cppm,inc,ipp' HEAD~1 \
-- $(find libcxx/{benchmarks,include,modules,src}/ -type f | grep -vf libcxx/utils/data/ignore_format.txt) \
-- $(find libcxx/{benchmarks,include,modules,src} -type f | grep -vf libcxx/utils/data/ignore_format.txt) \
| tee ${BUILD_DIR}/clang-format.patch
# Check if the diff is empty, fail otherwise.
! grep -q '^--- a' ${BUILD_DIR}/clang-format.patch