]> granicus.if.org Git - clang/commitdiff
fix example as per rdar://problem/9461587
authorBlaine Garst <blaine@apple.com>
Tue, 14 Jun 2011 21:41:00 +0000 (21:41 +0000)
committerBlaine Garst <blaine@apple.com>
Tue, 14 Jun 2011 21:41:00 +0000 (21:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133012 91177308-0d34-0410-b5e6-96231b3b80d8

docs/BlockLanguageSpec.txt

index a612fd28892bb80c39f2242cc3624ecc0b1f8f5c..f7bbda365184a002d90b710d8300b977921a6355 100644 (file)
@@ -151,7 +151,7 @@ For example, given class Foo with member function fighter(void):
 ...a Block that used foo would import the variables as const variations:
        const Foo block_foo = foo;      // const copy constructor
        const Foo &block_fooRef = fooRef;
-       const Foo *block_fooPtr = fooPtr;
+       Foo *const block_fooPtr = fooPtr;
 
 Stack-local objects are copied into a Block via a copy const constructor.  If no such constructor exists, it is considered an error to reference such objects from within the Block compound statements. A destructor is run as control leaves the compound statement that contains the Block literal expression.