summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2012-10-29 17:46:47 +0000
committerJordan Rose <jordan_rose@apple.com>2012-10-29 17:46:47 +0000
commit25c0ea8995950ba8f4c53cd3e8252f6cfb0947a7 (patch)
tree164a3650073bddd05e193104d7c54f5b95f4edaf /clang/lib/CodeGen/CodeGenModule.cpp
parentec44ac6a59d24c02c2f6036efcfb511b5608e009 (diff)
downloadbcm5719-llvm-25c0ea8995950ba8f4c53cd3e8252f6cfb0947a7.tar.gz
bcm5719-llvm-25c0ea8995950ba8f4c53cd3e8252f6cfb0947a7.zip
-Warc-repeated-use-of-weak: allow single reads in loops from local variables.
Previously, the warning would erroneously fire on this: for (Test *a in someArray) use(a.weakProp); ...because it looks like the same property is being accessed over and over. However, clearly this is not the case. We now ignore loops like this for local variables, but continue to warn if the base object is a parameter, global variable, or instance variable, on the assumption that these are not repeatedly usually assigned to within loops. Additionally, do-while loops where the condition is 'false' are not really loops at all; usually they're just used for semicolon-swallowing macros or using "break" like "goto". <rdar://problem/12578785&12578849> llvm-svn: 166942
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud