minix/external/bsd/llvm/dist/clang/test/SemaObjCXX/decltype.mm
Lionel Sambuc f4a2713ac8 Importing netbsd clang -- pristine
Change-Id: Ia40e9ffdf29b5dab2f122f673ff6802a58bc690f
2014-07-28 17:05:57 +02:00

25 lines
436 B
Text

// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
// expected-no-diagnostics
struct HasValueType {
typedef int value_type;
};
__attribute__((objc_root_class))
@interface Foo
{
@protected
HasValueType foo;
}
@property (nonatomic) HasValueType bar;
@end
@implementation Foo
@synthesize bar;
- (void)test {
decltype(foo)::value_type vt1;
decltype(self->foo)::value_type vt2;
decltype(self.bar)::value_type vt3;
}
@end