summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExprScalar.cpp
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2013-11-08 01:15:35 +0000
committerJordan Rose <jordan_rose@apple.com>2013-11-08 01:15:35 +0000
commit219103d76a10b35b5a1e8d2b6737cf724a7cfee7 (patch)
treebb0e8c01b3d6063b5a07b829ba40413f72ccb05f /lib/CodeGen/CGExprScalar.cpp
parent64cc0c37f78719f905029a9099445c214cb40ce3 (diff)
downloadclang-219103d76a10b35b5a1e8d2b6737cf724a7cfee7.tar.gz
clang-219103d76a10b35b5a1e8d2b6737cf724a7cfee7.tar.bz2
clang-219103d76a10b35b5a1e8d2b6737cf724a7cfee7.tar.xz
[analyzer] Track whether an ObjC for-in loop had zero iterations.
An Objective-C for-in loop will have zero iterations if the collection is empty. Previously, we could only detect this case if the program asked for the collection's -count /before/ the for-in loop. Now, the analyzer distinguishes for-in loops that had zero iterations from those with at least one, and can use this information to constrain the result of calling -count after the loop. In order to make this actually useful, teach the checker that methods on NSArray, NSDictionary, and the other immutable collection classes don't change the count. <rdar://problem/14992886> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194235 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprScalar.cpp')
0 files changed, 0 insertions, 0 deletions