aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2010-08-11 18:57:26 +0000
committerFariborz Jahanian <fjahanian@apple.com>2010-08-11 18:57:26 +0000
commit36e738a8cb11a95763e6e44ab9d0c69b9cb2437c (patch)
treed20b18fa9717817b948bd554057f0bb93205afc7
parent27372b4f1f402e95dd479ecf40c39ca71c15619f (diff)
Update documentation regarding use of 'class' in
property-dot syntax. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110841 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--www/compatibility.html25
1 files changed, 25 insertions, 0 deletions
diff --git a/www/compatibility.html b/www/compatibility.html
index 0f8409b953..4ad5bc018a 100644
--- a/www/compatibility.html
+++ b/www/compatibility.html
@@ -58,6 +58,9 @@
<ul>
<li><a href="#implicit-downcasts">Implicit downcasts</a></li>
</ul>
+ <ul>
+ <li><a href="#Use of class as method name">Use of class as method name</a></li>
+ </ul>
</li>
</ul>
@@ -604,6 +607,28 @@ explicit cast:</p>
f((Derived *)base);
</pre>
+<!-- ======================================================================= -->
+<h3 id="Use of class as method name">Use of class as method name</h3>
+<!-- ======================================================================= -->
+
+<p>Use of 'class' name to declare a method is allowed in objective-c++ mode to
+be compatible with GCC. However, use of property dot syntax notation to call
+this method is not allowed in clang++, as [I class] is a suitable syntax that
+will work. So, this test will fail in clang++.
+
+<pre>
+@interface I {
+int cls;
+}
++ (int)class;
+@end
+
+@implementation I
+- (int) Meth { return I.class; }
+@end
+<pre>
+
+
</div>
</body>
</html>