This is an archive of the discontinued LLVM Phabricator instance.

[clang][ExtractAPI] Add multiple file support to --extract-api-ignores
ClosedPublic

Authored by Arsenic on Mar 12 2023, 6:07 AM.

Details

Summary
  • Modify -extract-api-ignores command line option to accept multiple arguments
  • Update APIIgnoresList to operate on a file list instead of a single file
  • Add new test verifying the functionality
  • fix #61242 on GitHub issue tracker

Diff Detail

Event Timeline

Arsenic created this revision.Mar 12 2023, 6:07 AM
Herald added a project: Restricted Project. · View Herald Transcript
Arsenic requested review of this revision.Mar 12 2023, 6:07 AM
Herald added a project: Restricted Project. · View Herald Transcript
Herald added a subscriber: cfe-commits. · View Herald Transcript
dang added inline comments.Mar 13 2023, 3:26 AM
clang/test/ExtractAPI/ignored-symbols-multifile.c
35

This test doesn't check the symbol name sorting behavior across multiple files, which is crucial APIIgnoresList::shouldIgnore(StringRef SymbolName) because it uses binary search to find the symbol in the list. Would you be able to shuffle the order of the macros so that they aren't pre-sorted?

Arsenic updated this revision to Diff 504590.Mar 13 2023, 4:20 AM

Update clang/test/ExtractAPI/ignored-symbols-multifile.c :
Shuffle the order of ignored symbols in test to check the sorting behaviour of APIIgnoresList

dang added inline comments.Mar 13 2023, 4:35 AM
clang/test/ExtractAPI/ignored-symbols-multifile.c
28

Should this not be a 6?

dang accepted this revision.Mar 13 2023, 4:36 AM

LGTM once you fix the test

This revision is now accepted and ready to land.Mar 13 2023, 4:36 AM
Arsenic marked 2 inline comments as done.Mar 13 2023, 4:42 AM
This revision was landed with ongoing or failed builds.Mar 13 2023, 5:39 AM
This revision was automatically updated to reflect the committed changes.