llvm-project/clang/test/SemaCXX/suppress-availability-error-cf-options.cpp
zoecarver bb58748e52 [clang/cxx-interop] Teach clang to ignore availability errors that come from CF_OPTIONS
This cherry-picks https://github.com/apple/llvm-project/pull/6431
since without it, macOS 14 SDK headers don't compile when targeting
catalyst.

Fixes #64438.
2023-08-07 09:56:25 -04:00

10 lines
283 B
C++

// 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
};