diff options
author | Serge Guelton <sguelton@quarkslab.com> | 2018-12-18 08:36:33 +0000 |
---|---|---|
committer | Serge Guelton <sguelton@quarkslab.com> | 2018-12-18 08:36:33 +0000 |
commit | c0ebe773cd0fb301474430205c69440f9915d5b0 (patch) | |
tree | 15c98a08b79b0dddbfeea4f95372771ba44d4dd1 /clang/docs/tools | |
parent | 85833393d0e588f6d7613567db9c212236e3f0eb (diff) | |
download | bcm5719-llvm-c0ebe773cd0fb301474430205c69440f9915d5b0.tar.gz bcm5719-llvm-c0ebe773cd0fb301474430205c69440f9915d5b0.zip |
Portable Python script across Python version
Using from __future__ import print_function it is possible to have a compatible behavior of `print(...)` across Python version.
Differential Revision: https://reviews.llvm.org/D55213
llvm-svn: 349454
Diffstat (limited to 'clang/docs/tools')
-rwxr-xr-x | clang/docs/tools/dump_ast_matchers.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/docs/tools/dump_ast_matchers.py b/clang/docs/tools/dump_ast_matchers.py index 2c0cbafa8ab..cae27b20a97 100755 --- a/clang/docs/tools/dump_ast_matchers.py +++ b/clang/docs/tools/dump_ast_matchers.py @@ -41,7 +41,7 @@ def esc(text): url = 'https://clang.llvm.org/doxygen/classclang_1_1%s.html' % name if url not in doxygen_probes: try: - print 'Probing %s...' % url + print('Probing %s...' % url) urllib2.urlopen(url) doxygen_probes[url] = True except: @@ -307,14 +307,14 @@ def act_on_decl(declaration, comment, allowed_types): if not result_types: if not comment: # Only overloads don't have their own doxygen comments; ignore those. - print 'Ignoring "%s"' % name + print('Ignoring "%s"' % name) else: - print 'Cannot determine result type for "%s"' % name + print('Cannot determine result type for "%s"' % name) else: for result_type in result_types: add_matcher(result_type, name, args, comment) else: - print '*** Unparsable: "' + declaration + '" ***' + print('*** Unparsable: "' + declaration + '" ***') def sort_table(matcher_type, matcher_map): """Returns the sorted html table for the given row map.""" |