Skip to content

Commit a650ff0

Browse files
committed
[msvc] Fix another test using forward declared enums.
Forward declared enums create a warning in MSVC which turns into an error when -warnings-as-errors is passed. This disable the warning in the header to avoid the error making the test fail.
1 parent cd3ada5 commit a650ff0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/ClangImporter/Inputs/custom-modules/EnumExhaustivity.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
enum _name _name; \
66
enum __attribute__((enum_extensibility(closed))) _name
77

8+
9+
#pragma clang diagnostic push
10+
#pragma clang diagnostic ignored "-Wmicrosoft-enum-forward-reference"
811
typedef MY_ENUM(RegularEnum) {
912
RegularEnumA,
1013
RegularEnumB
@@ -47,3 +50,4 @@ enum __attribute__((enum_extensibility(closed))) UnavailableCases {
4750
UnavailableCasesB,
4851
UnavailableCasesThisIsTheUnavailableOne __attribute__((availability(swift, unavailable)))
4952
};
53+
#pragma clang diagnostic pop

0 commit comments

Comments
 (0)