[clang-repl] Lay the foundation of pretty printing for C. (#89811)
[llvm-project.git] / clang / test / APINotes / search-order.m
blob17e81d5eb2d691d480a743f59368846b2a9438a4
1 // RUN: rm -rf %t && mkdir -p %t
3 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/ModulesCache -fapinotes-modules -fsyntax-only -I %S/Inputs/Headers -F %S/Inputs/Frameworks %s -DFROM_FRAMEWORK=1 -verify
5 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/ModulesCache -iapinotes-modules %S/Inputs/APINotes  -fsyntax-only -I %S/Inputs/Headers -F %S/Inputs/Frameworks %s -DFROM_SEARCH_PATH=1 -verify
7 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/ModulesCache -fapinotes-modules -iapinotes-modules %S/Inputs/APINotes  -fsyntax-only -I %S/Inputs/Headers -F %S/Inputs/Frameworks %s -DFROM_FRAMEWORK=1 -verify
9 @import SomeOtherKit;
11 void test(A *a) {
12 #if FROM_FRAMEWORK
13   [a methodA]; // expected-error{{unavailable}}
14   [a methodB];
16   // expected-note@SomeOtherKit/SomeOtherKit.h:5{{'methodA' has been explicitly marked unavailable here}}
17 #elif FROM_SEARCH_PATH
18   [a methodA];
19   [a methodB]; // expected-error{{unavailable}}
21   // expected-note@SomeOtherKit/SomeOtherKit.h:6{{'methodB' has been explicitly marked unavailable here}}
22 #else
23 #  error Not something we need to test
24 #endif