summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaObjCXX
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-02-16 18:19:22 +0000
committerDouglas Gregor <dgregor@apple.com>2012-02-16 18:19:22 +0000
commit36107ade6f519fbb30826cec39ed8f3ec1020d7e (patch)
tree57b38d39c5a0d69639c97e57000c726488b5b15b /clang/test/SemaObjCXX
parentbc6ba479b6df7bc4cf284a92873b7ba6c2430e56 (diff)
downloadbcm5719-llvm-36107ade6f519fbb30826cec39ed8f3ec1020d7e.tar.gz
bcm5719-llvm-36107ade6f519fbb30826cec39ed8f3ec1020d7e.zip
In Objective-C++, allow the keyword 'class' to be used as a property
name for dot syntax, e.g., NSObject.class or foo.class. For other C++-keywords-as-method-names, use message send syntax. Fixes <rdar://problem/10794452>. llvm-svn: 150710
Diffstat (limited to 'clang/test/SemaObjCXX')
-rw-r--r--clang/test/SemaObjCXX/properties.mm17
1 files changed, 17 insertions, 0 deletions
diff --git a/clang/test/SemaObjCXX/properties.mm b/clang/test/SemaObjCXX/properties.mm
index ac780c023bf..0264f463ada 100644
--- a/clang/test/SemaObjCXX/properties.mm
+++ b/clang/test/SemaObjCXX/properties.mm
@@ -68,3 +68,20 @@ void test5(Test5* t5) {
if (t5->count < 2) { }
}
+
+@interface Test6
++ (Class)class;
+- (Class)class;
+@end
+
+void test6(Test6 *t6) {
+ Class x = t6.class;
+ Class x2 = Test6.class;
+}
+
+template<typename T>
+void test6_template(T *t6) {
+ Class x = t6.class;
+}
+
+template void test6_template(Test6*);
OpenPOWER on IntegriCloud