[cfe-commits] r110841 - /cfe/trunk/www/compatibility.html
Fariborz Jahanian
fjahanian at apple.com
Wed Aug 11 11:57:26 PDT 2010
Author: fjahanian
Date: Wed Aug 11 13:57:26 2010
New Revision: 110841
URL: http://llvm.org/viewvc/llvm-project?rev=110841&view=rev
Log:
Update documentation regarding use of 'class' in
property-dot syntax.
Modified:
cfe/trunk/www/compatibility.html
Modified: cfe/trunk/www/compatibility.html
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/www/compatibility.html?rev=110841&r1=110840&r2=110841&view=diff
==============================================================================
--- cfe/trunk/www/compatibility.html (original)
+++ cfe/trunk/www/compatibility.html Wed Aug 11 13:57:26 2010
@@ -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 @@
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>
+ at interface I {
+int cls;
+}
++ (int)class;
+ at end
+
+ at implementation I
+- (int) Meth { return I.class; }
+ at end
+<pre>
+
+
</div>
</body>
</html>
More information about the cfe-commits
mailing list