[clang-tools-extra] r247485 - [clang-tidy] Fix minor issues in the testing script.

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 11 15:38:26 PDT 2015


Author: alexfh
Date: Fri Sep 11 17:38:26 2015
New Revision: 247485

URL: http://llvm.org/viewvc/llvm-project?rev=247485&view=rev
Log:
[clang-tidy] Fix minor issues in the testing script.

Modified:
    clang-tools-extra/trunk/test/clang-tidy/check_clang_tidy.py

Modified: clang-tools-extra/trunk/test/clang-tidy/check_clang_tidy.py
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/check_clang_tidy.py?rev=247485&r1=247484&r2=247485&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/check_clang_tidy.py (original)
+++ clang-tools-extra/trunk/test/clang-tidy/check_clang_tidy.py Fri Sep 11 17:38:26 2015
@@ -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__':




More information about the cfe-commits mailing list