diff options
author | Ankur <arsenic.secondary@gmail.com> | 2023-03-13 17:58:39 +0530 |
---|---|---|
committer | Ankur <arsenic.secondary@gmail.com> | 2023-03-13 18:05:16 +0530 |
commit | 58825d2cf947d0b4fb6590c17212c388cd3ff5cf (patch) | |
tree | b272ac6ed973de1f74c067da09942b68fa47ee2a /clang/test/ExtractAPI | |
parent | 5a0ad86cf345bdac53f4b18ebbba582aebe9e2b3 (diff) | |
download | llvm-58825d2cf947d0b4fb6590c17212c388cd3ff5cf.zip llvm-58825d2cf947d0b4fb6590c17212c388cd3ff5cf.tar.gz llvm-58825d2cf947d0b4fb6590c17212c388cd3ff5cf.tar.bz2 |
[clang][ExtractAPI] Add multiple file support to --extract-api-ignores
- 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
Reviewed By: dang
Differential Revision: https://reviews.llvm.org/D145869
Diffstat (limited to 'clang/test/ExtractAPI')
-rw-r--r-- | clang/test/ExtractAPI/ignored-symbols-multifile.c | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/clang/test/ExtractAPI/ignored-symbols-multifile.c b/clang/test/ExtractAPI/ignored-symbols-multifile.c new file mode 100644 index 0000000..d4a4c3d --- /dev/null +++ b/clang/test/ExtractAPI/ignored-symbols-multifile.c @@ -0,0 +1,44 @@ +// RUN: rm -rf %t +// RUN: split-file %s %t +// RUN: %clang_cc1 -extract-api -triple arm64-apple-macosx \ +// RUN: --extract-api-ignores=%t/ignores-list1,%t/ignores-list2,%t/ignores-list3 \ +// RUN: -x c-header %t/input.h -verify -o - | FileCheck %t/input.h + +//--- input.h +#define IGNORED_6_FILE1 6 +#define IGNORED_2_FILE1 2 +#define IGNORED_5_FILE1 5 + +#define IGNORED_4_FILE2 4 +#define IGNORED_3_FILE2 3 + +typedef double IGNORED_1_FILE3; +typedef int IGNORED_7_FILE3; + +typedef float NonIgnored; + +// CHECK-NOT: IGNORED_6_FILE1 +// CHECK-NOT: IGNORED_2_FILE1 +// CHECK-NOT: IGNORED_5_FILE1 + +// CHECK-NOT: IGNORED_4_FILE2 +// CHECK-NOT: IGNORED_3_FILE2 + +// CHECK-NOT: IGNORED_1_FILE3 +// CHECK-NOT: IGNORED_7_FILE3 +// CHECK: NonIgnored + +// expected-no-diagnostics + +//--- ignores-list1 +IGNORED_6_FILE1 +IGNORED_2_FILE1 +IGNORED_5_FILE1 + +//--- ignores-list2 +IGNORED_4_FILE2 +IGNORED_3_FILE2 + +//--- ignores-list3 +IGNORED_1_FILE3 +IGNORED_7_FILE3 |