Make clang-format-all.sh only look at source files

clang-format will modify non source files and has no configuration
options to ignore bash, python, or extensionless files. This CL is a
follow up for:

https://swiftshader-review.googlesource.com/c/git-hooks/+/54569

Bug: b/187094215
Change-Id: I72953bd07e3c16b70aab441a25c27abae31b6a87
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/54689
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Commit-Queue: Sean Risser <srisser@google.com>
Tested-by: Sean Risser <srisser@google.com>
diff --git a/src/clang-format-all.sh b/src/clang-format-all.sh
index 80b7057..3054301 100755
--- a/src/clang-format-all.sh
+++ b/src/clang-format-all.sh
@@ -43,7 +43,7 @@
     done
 else
     BASEDIR=$(git rev-parse --show-toplevel)
-    FILES=$(git diff --cached --name-only --diff-filter=ACM | grep -v '\.sh')
+    FILES=$(git diff --cached --name-only --diff-filter=ACM | grep '\.cpp$\|\.hpp\|\.c$\|\.h$')
     for FILE in $FILES
     do
         ${CLANG_FORMAT} -i -style=file "$BASEDIR/$FILE"