brintos

brintos / llvm-project-archived public Read only

0
0
Text · 738 B · 2b48aea Raw
24 lines · plain
1// RUN: %clang_cc1 -fsyntax-only -DBOTH -verify %s2// If the decls come from a pch, the behavior shouldn't change:3// RUN: %clang_cc1 -x objective-c-header %s -emit-pch -o %t4// RUN: %clang_cc1 -DUSES -include-pch %t -fsyntax-only -verify %s5// expected-no-diagnostics6 7// The slightly strange ifdefs are so that the command that builds the gch file8// doesn't need any -D switches, for these would get embedded in the gch.9 10#ifndef USES11@interface Interface112- (void)partiallyUnavailableMethod;13@end14@interface Interface215- (void)partiallyUnavailableMethod __attribute__((unavailable));16@end17#endif18 19#if defined(USES) || defined(BOTH)20void f(id a) {21  [a partiallyUnavailableMethod];  // no warning, `a` could be an Interface1.22}23#endif24