llvm-project/clang/test/APINotes/objc-forward-declarations.m
Egor Zhdan 932949dbb5
[APINotes] Upstream the remaining API Notes fixes and tests
This upstreams the last bits of Clang API Notes functionality that is
currently implemented in the Apple fork:
https://github.com/apple/llvm-project/tree/next/clang/lib/APINotes
2024-03-27 13:13:06 +00:00

13 lines
502 B
Objective-C

// RUN: rm -rf %t && mkdir -p %t
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/ModulesCache -fapinotes-modules -fsyntax-only -F %S/Inputs/Frameworks %s -verify
@import LayeredKit;
void test(
UpwardClass *okayClass,
id <UpwardProto> okayProto,
PerfectlyNormalClass *badClass // expected-error {{'PerfectlyNormalClass' is unavailable}}
) {
// expected-note@LayeredKitImpl/LayeredKitImpl.h:4 {{'PerfectlyNormalClass' has been explicitly marked unavailable here}}
}