From 4a27478a5b8bd9f13fef65e66b291a352c532371 Mon Sep 17 00:00:00 2001 From: Serge Guelton Date: Thu, 3 Jan 2019 14:11:33 +0000 Subject: Python compat - print statement Make sure all print statements are compatible with Python 2 and Python3 using the `from __future__ import print_function` statement. Differential Revision: https://reviews.llvm.org/D56249 llvm-svn: 350307 --- llvm/utils/lint/cpp_lint.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'llvm/utils/lint/cpp_lint.py') diff --git a/llvm/utils/lint/cpp_lint.py b/llvm/utils/lint/cpp_lint.py index 07fad5840fd..2fb8cc93c19 100755 --- a/llvm/utils/lint/cpp_lint.py +++ b/llvm/utils/lint/cpp_lint.py @@ -6,6 +6,7 @@ # TODO: add unittests for the verifier functions: # http://docs.python.org/library/unittest.html . +from __future__ import print_function import common_lint import re import sys @@ -86,7 +87,7 @@ class CppLint(common_lint.BaseLint): def CppLintMain(filenames): all_lint = common_lint.RunLintOverAllFiles(CppLint(), filenames) for lint in all_lint: - print '%s:%d:%s' % (lint[0], lint[1], lint[2]) + print('%s:%d:%s' % (lint[0], lint[1], lint[2])) return 0 -- cgit v1.2.3