-Warc-repeated-use-of-weak: look through explicit casts on assigned values.
Reading from a weak property, casting the result, and assigning to a
strong pointer should still be considered safe.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165629 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/ScopeInfo.cpp b/lib/Sema/ScopeInfo.cpp
index 7a9d917..76f967d 100644
--- a/lib/Sema/ScopeInfo.cpp
+++ b/lib/Sema/ScopeInfo.cpp
@@ -115,7 +115,7 @@
}
void FunctionScopeInfo::markSafeWeakUse(const Expr *E) {
- E = E->IgnoreParenImpCasts();
+ E = E->IgnoreParenCasts();
if (const PseudoObjectExpr *POE = dyn_cast<PseudoObjectExpr>(E)) {
markSafeWeakUse(POE->getSyntacticForm());