minix/external/bsd/llvm/dist/clang/test/PCH/chain-class-extension.m
Lionel Sambuc f4a2713ac8 Importing netbsd clang -- pristine
Change-Id: Ia40e9ffdf29b5dab2f122f673ff6802a58bc690f
2014-07-28 17:05:57 +02:00

44 lines
1.1 KiB
Objective-C

// Without PCH
// RUN: %clang_cc1 -fsyntax-only -verify -triple x86_64-apple-darwin10 -fobjc-arc %s -include %s -include %s
// With PCH
// RUN: %clang_cc1 -fsyntax-only -verify -triple x86_64-apple-darwin10 -fobjc-arc %s -chain-include %s -chain-include %s
// expected-no-diagnostics
#ifndef HEADER1
#define HEADER1
//===----------------------------------------------------------------------===//
// Primary header
@interface I
+(void)meth;
@end
//===----------------------------------------------------------------------===//
#elif !defined(HEADER2)
#define HEADER2
#if !defined(HEADER1)
#error Header inclusion order messed up
#endif
//===----------------------------------------------------------------------===//
// Dependent header
@interface I()
@property (assign) id prop;
+(void)meth2;
@end
//===----------------------------------------------------------------------===//
#else
//===----------------------------------------------------------------------===//
void foo(I *i) {
[I meth];
[I meth2];
i.prop = 0;
}
//===----------------------------------------------------------------------===//
#endif