]> granicus.if.org Git - clang/commit
Have attribute 'objc_precise_lifetime' suppress -Wunused.
authorTed Kremenek <kremenek@apple.com>
Thu, 9 Jan 2014 20:19:45 +0000 (20:19 +0000)
committerTed Kremenek <kremenek@apple.com>
Thu, 9 Jan 2014 20:19:45 +0000 (20:19 +0000)
commit5e244eeac32619f73bb961d5688ac5d202329fbd
treec1a0660f0770538e11ae71a50288f468a11739ce
parent082a4b9bda9e808b56dc99b53de69d5e875672b6
Have attribute 'objc_precise_lifetime' suppress -Wunused.

Fixes <rdar://problem/15596883>

In ARC, __attribute__((objc_precise_lifetime)) guarantees that the
object stored in it will survive to the end of the variable's formal
lifetime.  It is therefore useful even if it completely unused.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198888 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaDecl.cpp
test/SemaObjC/unused.m