summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/Builtins.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
commit1a4ae202c7371528555a9c52f601ae48cf8457e6 (patch)
tree4b2da8fc25195fa80b9f8e9d76d894a2f7a8d79c /clang/lib/Basic/Builtins.cpp
parent236dbd25e77521977335b37f5fb915e5678b1195 (diff)
downloadbcm5719-llvm-1a4ae202c7371528555a9c52f601ae48cf8457e6.tar.gz
bcm5719-llvm-1a4ae202c7371528555a9c52f601ae48cf8457e6.zip
[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> llvm-svn: 194235
Diffstat (limited to 'clang/lib/Basic/Builtins.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud