[PATCH] D114723: [clangd] Make std symbol generation script python3 friendly
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 29 10:15:04 PST 2021
kadircet created this revision.
kadircet added a reviewer: hokein.
Herald added subscribers: usaxena95, arphaman.
kadircet requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov.
Herald added a project: clang-tools-extra.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D114723
Files:
clang-tools-extra/clangd/include-mapping/gen_std.py
Index: clang-tools-extra/clangd/include-mapping/gen_std.py
===================================================================
--- clang-tools-extra/clangd/include-mapping/gen_std.py
+++ clang-tools-extra/clangd/include-mapping/gen_std.py
@@ -99,12 +99,12 @@
index_page_path = os.path.join(page_root, "index.html")
cppreference_modified_date = datetime.datetime.fromtimestamp(
os.stat(index_page_path).st_mtime).strftime('%Y-%m-%d')
- print CODE_PREFIX % (args.language.upper(), cppreference_modified_date)
+ print(CODE_PREFIX % (args.language.upper(), cppreference_modified_date))
for symbol in symbols:
if len(symbol.headers) == 1:
# SYMBOL(unqualified_name, namespace, header)
- print "SYMBOL(%s, %s, %s)" % (symbol.name, symbol.namespace,
- symbol.headers[0])
+ print("SYMBOL(%s, %s, %s)" % (symbol.name, symbol.namespace,
+ symbol.headers[0]))
elif len(symbol.headers) == 0:
sys.stderr.write("No header found for symbol %s\n" % symbol.name)
else:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114723.390400.patch
Type: text/x-patch
Size: 1077 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211129/ca6255aa/attachment.bin>
More information about the cfe-commits
mailing list