[clang-tidy] Fix minor issues in the testing script.
authorAlexander Kornienko <alexfh@google.com>
Fri, 11 Sep 2015 22:38:26 +0000 (22:38 +0000)
committerAlexander Kornienko <alexfh@google.com>
Fri, 11 Sep 2015 22:38:26 +0000 (22:38 +0000)
llvm-svn: 247485

clang-tools-extra/test/clang-tidy/check_clang_tidy.py

index 8da9156..2bb3fd8 100755 (executable)
@@ -41,13 +41,14 @@ def main():
   extension = '.cpp'
   if (input_file_name.endswith('.c')):
     extension = '.c'
-    
+
   check_name = sys.argv[2]
   temp_file_name = sys.argv[3] + extension
 
   clang_tidy_extra_args = sys.argv[4:]
   if len(clang_tidy_extra_args) == 0:
-    clang_tidy_extra_args = ['--', '--std=c++11'] if extension == '.cpp' else ['--']
+    clang_tidy_extra_args = ['--', '--std=c++11'] if extension == '.cpp' \
+                       else ['--']
 
   with open(input_file_name, 'r') as input_file:
     input_text = input_file.read()
@@ -97,7 +98,7 @@ def main():
            '-check-prefix=CHECK-FIXES', '-strict-whitespace'],
           stderr=subprocess.STDOUT)
     except subprocess.CalledProcessError as e:
-      print('FileCheck failed:\n' + e.output)
+      print('FileCheck failed:\n' + e.output.decode())
       raise
 
   if has_check_messages:
@@ -110,7 +111,7 @@ def main():
            '-implicit-check-not={{warning|error}}:'],
           stderr=subprocess.STDOUT)
     except subprocess.CalledProcessError as e:
-      print('FileCheck failed:\n' + e.output)
+      print('FileCheck failed:\n' + e.output.decode())
       raise
 
 if __name__ == '__main__':