-
Notifications
You must be signed in to change notification settings - Fork 11.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[clang/cxx-interop] Teach clang to ignore availability errors that co…
…me from CF_OPTIONS This cherry-picks swiftlang#6431 since without it, macOS 14 SDK headers don't compile when targeting catalyst. Fixes #64438. (cherry picked from commit bb58748)
- Loading branch information
Showing
2 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
clang/test/SemaCXX/suppress-availability-error-cf-options.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// RUN: %clang_cc1 -fsyntax-only -verify %s | ||
// expected-no-diagnostics | ||
|
||
#define CF_OPTIONS(_type, _name) __attribute__((availability(swift, unavailable))) _type _name; enum : _name | ||
|
||
__attribute__((availability(macOS, unavailable))) | ||
typedef CF_OPTIONS(unsigned, TestOptions) { | ||
x | ||
}; |