]> granicus.if.org Git - clang/commit
[arcmt] Emit an error for unused -autorelease messages.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Thu, 14 Jul 2011 21:26:49 +0000 (21:26 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Thu, 14 Jul 2011 21:26:49 +0000 (21:26 +0000)
commite0e40768cc8c4b2a9093dac3d777e0d362cb7a88
tree7b7f9ab14abf68e4f19728d08d63fe8d4101149f
parentac420c5053d6aa41d59f782caad9e46e5baaf2c2
[arcmt] Emit an error for unused -autorelease messages.

An unused autorelease is badness. If we remove it the receiver
will likely die immediately while previously it was kept alive
by the autorelease pool. This is bad practice in general, so leave it
and emit an error to force the user to restructure his code.

rdar://9599884

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135193 91177308-0d34-0410-b5e6-96231b3b80d8
lib/ARCMigrate/TransRetainReleaseDealloc.cpp
test/ARCMT/checking.m
test/ARCMT/cxx-rewrite.mm
test/ARCMT/remove-statements.m
test/ARCMT/retains.m