[polly] r175305 - check that clang-format exists

Sebastian Pop spop at codeaurora.org
Fri Feb 15 13:26:50 PST 2013


Author: spop
Date: Fri Feb 15 15:26:50 2013
New Revision: 175305

URL: http://llvm.org/viewvc/llvm-project?rev=175305&view=rev
Log:
check that clang-format exists

Modified:
    polly/trunk/utils/check_format.sh

Modified: polly/trunk/utils/check_format.sh
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/utils/check_format.sh?rev=175305&r1=175304&r2=175305&view=diff
==============================================================================
--- polly/trunk/utils/check_format.sh (original)
+++ polly/trunk/utils/check_format.sh Fri Feb 15 15:26:50 2013
@@ -1,5 +1,10 @@
 #!/bin/bash
 
+if ! which clang-format; then
+    echo "Error: cannot find clang-format in your path"
+    exit 1
+fi
+
 OK=0
 
 for ARG in "$@"
@@ -13,7 +18,9 @@ for ARG in "$@"
 
 if [[ $OK -eq "1" ]]; then
   echo "Error: clang-format reported formatting differences"
+  exit 1
 else
   echo "OK: clang-format reported no formatting differences"
+  exit 0
 fi
 





More information about the llvm-commits mailing list