Re: r293199 - Turn on -Wblock-capture-autoreleasing by default.

2017-02-14 Thread Akira Hatanaka via cfe-commits
Yes, you are correct: clang implicitly marks indirect parameters with __autoreleasing. The whole purpose of Wblock-capture-autoreleasing (which was committed in r285031) is to inform the users that clang has implicitly marked an out-parameter as __autoreleasing. clang doesn’t warn if the user

Re: r293199 - Turn on -Wblock-capture-autoreleasing by default.

2017-02-13 Thread Nico Weber via cfe-commits
If I'm understanding you correctly, you're saying that clang implicitly marks the indirect NSError** parameter with __autoreleasing, so there's no bug here. Is that correct? If so, should Wblock-capture-autoreleasing just not fire on parameters that are already implicitly marked as

Re: r293199 - Turn on -Wblock-capture-autoreleasing by default.

2017-02-12 Thread Akira Hatanaka via cfe-commits
Hi Nico, The documentation might confuse people now that the warning is on by default, but it’s correct as clang still qualifies indirect parameters with __autoreleasing. We had to add this warning and turn it on by default because a lot of people capture indirect parameters in their code not

Re: r293199 - Turn on -Wblock-capture-autoreleasing by default.

2017-02-11 Thread Nico Weber via cfe-commits
Hi Akira, this fires in internal chrome/ios code like so: somefile.m: error: block captures an autoreleasing out-parameter, which may result in use-after-free bugs [-Werror,-Wblock-capture-autoreleasing] if (error) { ^ somefile.m: note: declare the parameter

r293199 - Turn on -Wblock-capture-autoreleasing by default.

2017-01-26 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Jan 26 12:51:10 2017 New Revision: 293199 URL: http://llvm.org/viewvc/llvm-project?rev=293199=rev Log: Turn on -Wblock-capture-autoreleasing by default. Turning on the warning by default helps the users as it's a common mistake to capture out-parameters in a block