aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Checkers/StreamChecker.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
commitc0e44454bd78b8b4f3d70f08cf1edd5466b0c798 (patch)
tree5814023de0f1188eea089f95b58fec382d4d4e65 /lib/StaticAnalyzer/Checkers/StreamChecker.cpp
parent6a329ee7567cf3267ffab2bc755ea8c773d967e7 (diff)
-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> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166942 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/StreamChecker.cpp')
0 files changed, 0 insertions, 0 deletions