Author: pcbeard
Date: Tue Mar 20 16:09:25 2012
New Revision: 153126
URL: http://llvm.org/viewvc/llvm-project?rev=153126&view=rev
Log:
Fixed typos.
Modified:
cfe/trunk/docs/ObjectiveCLiterals.html
Modified: cfe/trunk/docs/ObjectiveCLiterals.html
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/ObjectiveCLiterals.html?rev=153126&r1=153125&r2=153126&view=diff
==============================================================================
--- cfe/trunk/docs/ObjectiveCLiterals.html (original)
+++ cfe/trunk/docs/ObjectiveCLiterals.html Tue Mar 20 16:09:25 2012
@@ -120,11 +120,11 @@
};
</pre>
-This creates an <code>NSDictionary</code> with 3 key/value pairs. Value
sub-expressions of a dictionary literal must be Objective-C object pointer
typed, as in array literals. Key sub-expresions must be of an Objective-C
object pointer type that implements the <code><NSCopying></code>
protocol.<p>
+This creates an <code>NSDictionary</code> with 3 key/value pairs. Value
sub-expressions of a dictionary literal must be Objective-C object pointer
typed, as in array literals. Key sub-expressions must be of an Objective-C
object pointer type that implements the <code><NSCopying></code>
protocol.<p>
<h3>Discussion</h3>
-Nil keys or nil values are not supported in containers. If the compiler can
prove that a key or value is nil at compile time, then a warning will be
emitted. Otherwise, a runtime error will occur.<p>
+Neither keys nor values can have the value <code>nil</code> in containers. If
the compiler can prove that a key or value is <code>nil</code> at compile time,
then a warning will be emitted. Otherwise, a runtime error will occur.<p>
Using array and dictionary literals is safer than the variadic creation forms
commonly in use today. Array literal expressions expand to calls to
<code>+[NSArray arrayWithObjects:count:]</code>, which validates that all
objects are non-<code>nil</code>. The variadic form, <code>+[NSArray
arrayWithObjects:]</code> uses <code>nil</code> as an argument list terminator,
which can lead to malformed array objects. Dictionary literals are similarly
created with <code>+[NSDictionary dictionaryWithObjects:forKeys:count:]</code>
which validates all objects and keys, unlike <code>+[NSDictionary
dictionaryWithObjectsAndKeys:]</code> which also uses a <code>nil</code>
parameter as an argument list terminator.<p>
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits