This is an archive of the discontinued LLVM Phabricator instance.

[include-mapping] Fix parsing of html_book_20190607.zip (https://en.cppreference.com/w/File:html_book_20190607.zip). Skip entries that have been added to the index (C++20 symbols), but the corresponding pages for which have not been created yet.
ClosedPublic

Authored by VitaNuo on Jan 11 2023, 8:22 AM.

Diff Detail

Event Timeline

VitaNuo created this revision.Jan 11 2023, 8:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 11 2023, 8:22 AM
Herald added a subscriber: arphaman. · View Herald Transcript
VitaNuo requested review of this revision.Jan 11 2023, 8:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 11 2023, 8:22 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
hokein added inline comments.Jan 12 2023, 12:36 AM
clang/tools/include-mapping/cppreference_parser.py
118

so the input path can be invalid, pointing to a non-existing file, I'd just check it in the caller side, see my other comment.

144

I think just adding a file-existing check would work:

if os.path.isfile(path):
   results.append((symbol_name,
                      pool.apply_async(_ReadSymbolPage, (path, symbol_name))))
VitaNuo updated this revision to Diff 488539.Jan 12 2023, 1:40 AM

Address review comments.

VitaNuo marked an inline comment as done.Jan 12 2023, 1:41 AM

Thanks for the review!

clang/tools/include-mapping/cppreference_parser.py
118

good idea!

hokein accepted this revision.Jan 12 2023, 1:47 AM
This revision is now accepted and ready to land.Jan 12 2023, 1:47 AM
This revision was landed with ongoing or failed builds.Jan 12 2023, 1:49 AM
This revision was automatically updated to reflect the committed changes.
kadircet added inline comments.
clang/tools/include-mapping/cppreference_parser.py
145

sorry for being late to the party, but can you also print an error in the case we're dropping the symbol?

VitaNuo added inline comments.Jan 12 2023, 7:47 AM
clang/tools/include-mapping/cppreference_parser.py
145