aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenTBAA.cpp
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2013-04-26 21:43:01 +0000
committerJordan Rose <jordan_rose@apple.com>2013-04-26 21:43:01 +0000
commit5d2e4e1f9ed87ea26295e891acf7e5a3b106f194 (patch)
tree9738a635b234b8857d5b1a96ebafee1dfc4e7e53 /lib/CodeGen/CodeGenTBAA.cpp
parent5e6c06bc7deaaefe130b730032a9acb9cd38bf0c (diff)
[analyzer] An ObjC for-in loop runs 0 times if the collection is nil.
In an Objective-C for-in loop "for (id element in collection) {}", the loop will run 0 times if the collection is nil. This is because the for-in loop is implemented using a protocol method that returns 0 when there are no elements to iterate, and messages to nil will result in a 0 return value. At some point we may want to actually model this message send, but for now we may as well get the nil case correct, and avoid the false positives that would come with this case. <rdar://problem/13744632> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180639 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenTBAA.cpp')
0 files changed, 0 insertions, 0 deletions