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()
'-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:
'-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__':