]> granicus.if.org Git - clang/commitdiff
Fixed typos.
authorPatrick Beard <pcbeard@mac.com>
Tue, 20 Mar 2012 21:09:25 +0000 (21:09 +0000)
committerPatrick Beard <pcbeard@mac.com>
Tue, 20 Mar 2012 21:09:25 +0000 (21:09 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153126 91177308-0d34-0410-b5e6-96231b3b80d8

docs/ObjectiveCLiterals.html

index 277e6136913cad26a8228b581a8b26c3545ad061..2e533faf8ac06b79e9fce84cc214dcb54e694da8 100644 (file)
@@ -120,11 +120,11 @@ NSDictionary *dictionary = @{
 };
 </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>&LT;NSCopying&GT;</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>&LT;NSCopying&GT;</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>