Skip to content

Commit a4aab37

Browse files
coadofacebook-github-bot
authored andcommitted
Add test for parsing interfaces with deprecated attributes (#55771)
Summary: Adding tests for parsing interfaces with deprecated attributes and extending the doxygen test config with `__attribute__` predefined macro. ## Changelog: [Internal] Reviewed By: cipolleschi Differential Revision: D94343118
1 parent c90843d commit a4aab37

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

scripts/cxx-api/tests/snapshots/.doxygen.config.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2442,7 +2442,7 @@ INCLUDE_FILE_PATTERNS =
24422442
# recursively expanded use the := operator instead of the = operator.
24432443
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
24442444

2445-
PREDEFINED =
2445+
PREDEFINED = FOLLY_PACK_PUSH="" FOLLY_PACK_POP="" FOLLY_PACK_ATTR="" __attribute__(x)=""
24462446

24472447
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
24482448
# tag can be used to specify a list of macro names that should be expanded. The
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
interface RCTTestInterface {
2+
public virtual NSArray * interfaceDeprecatedMethod:(id param);
3+
public virtual void normalMethod:(NSString * name);
4+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*/
7+
8+
@interface RCTTestInterface
9+
10+
- (void)normalMethod:(NSString *)name;
11+
12+
- (NSArray *)interfaceDeprecatedMethod:(id)param __attribute__((deprecated("This method is deprecated.")));
13+
14+
@end

0 commit comments

Comments
 (0)