[clang-tools-extra] 015ce15 - [clang-format][NFC] Rewrite prints in python3 compatible way

Owen Pan via cfe-commits cfe-commits at lists.llvm.org
Sun Sep 25 13:41:34 PDT 2022


Author: Danil Sidoruk
Date: 2022-09-25T13:27:42-07:00
New Revision: 015ce15ea27bcd88447d84c4b277d775fede29f7

URL: https://github.com/llvm/llvm-project/commit/015ce15ea27bcd88447d84c4b277d775fede29f7
DIFF: https://github.com/llvm/llvm-project/commit/015ce15ea27bcd88447d84c4b277d775fede29f7.diff

LOG: [clang-format][NFC] Rewrite prints in python3 compatible way

Closes #55996.

Differential Revision: https://reviews.llvm.org/D131789

Added: 
    

Modified: 
    clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py b/clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py
index 8655af137bb27..a0fa64592e62b 100755
--- a/clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py
+++ b/clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py
@@ -39,7 +39,7 @@ def find_compilation_database(path):
   result = './'
   while not os.path.isfile(os.path.join(result, path)):
     if os.path.realpath(result) == '/':
-      print 'Error: could not find compilation database.'
+      print('Error: could not find compilation database.')
       sys.exit(1)
     result += '../'
   return os.path.realpath(result)
@@ -49,7 +49,7 @@ def MergeSymbols(directory, args):
   """Merge all symbol files (yaml) in a given directory into a single file."""
   invocation = [args.binary, '-merge-dir='+directory, args.saving_path]
   subprocess.call(invocation)
-  print 'Merge is finished. Saving results in ' + args.saving_path
+  print('Merge is finished. Saving results in ' + args.saving_path)
 
 
 def run_find_all_symbols(args, tmpdir, build_path, queue):
@@ -118,7 +118,7 @@ def main():
   except KeyboardInterrupt:
     # This is a sad hack. Unfortunately subprocess goes
     # bonkers with ctrl-c and we start forking merrily.
-    print '\nCtrl-C detected, goodbye.'
+    print('\nCtrl-C detected, goodbye.')
     os.kill(0, 9)
 
 


        


More information about the cfe-commits mailing list