Author: dgregor
Date: Wed Oct 24 09:13:21 2012
New Revision: 166562
URL: http://llvm.org/viewvc/llvm-project?rev=166562&view=rev
Log:
Add a simple test involving decltype on Objective-C properties and ivars
Added:
cfe/trunk/test/SemaObjCXX/decltype.mm
Added: cfe/trunk/test/SemaObjCXX/decltype.mm
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjCXX/decltype.mm?rev=166562&view=auto
==============================================================================
--- cfe/trunk/test/SemaObjCXX/decltype.mm (added)
+++ cfe/trunk/test/SemaObjCXX/decltype.mm Wed Oct 24 09:13:21 2012
@@ -0,0 +1,25 @@
+// 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
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits