[PATCH] D141611: [include-mapping] Print an error message in case the symbol index points to a non-existent page.

Viktoriia Bakalova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 12 07:47:08 PST 2023


VitaNuo updated this revision to Diff 488653.
VitaNuo added a comment.

Change implementation from using "print" to using "sys.stderr.write".


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141611/new/

https://reviews.llvm.org/D141611

Files:
  clang/tools/include-mapping/cppreference_parser.py


Index: clang/tools/include-mapping/cppreference_parser.py
===================================================================
--- clang/tools/include-mapping/cppreference_parser.py
+++ clang/tools/include-mapping/cppreference_parser.py
@@ -145,6 +145,8 @@
       if os.path.isfile(path):
         results.append((symbol_name,
                       pool.apply_async(_ReadSymbolPage, (path, symbol_name))))
+      else:
+        sys.stderr.write("Could not parse page: %s. Page does not exist.\n" % path)                
 
     # Build map from symbol name to a set of headers.
     symbol_headers = collections.defaultdict(set)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141611.488653.patch
Type: text/x-patch
Size: 628 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230112/6b2853d5/attachment.bin>


More information about the cfe-commits mailing list