From e723a27ffebe0f62d647c60eb8d71bd554631473 Mon Sep 17 00:00:00 2001 From: Jordan Rose Date: Wed, 10 Oct 2012 16:43:06 +0000 Subject: -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. llvm-svn: 165629 --- clang/lib/Sema/ScopeInfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/Sema/ScopeInfo.cpp') diff --git a/clang/lib/Sema/ScopeInfo.cpp b/clang/lib/Sema/ScopeInfo.cpp index 7a9d917a025..76f967d588b 100644 --- a/clang/lib/Sema/ScopeInfo.cpp +++ b/clang/lib/Sema/ScopeInfo.cpp @@ -115,7 +115,7 @@ FunctionScopeInfo::WeakObjectProfileTy::WeakObjectProfileTy( } void FunctionScopeInfo::markSafeWeakUse(const Expr *E) { - E = E->IgnoreParenImpCasts(); + E = E->IgnoreParenCasts(); if (const PseudoObjectExpr *POE = dyn_cast(E)) { markSafeWeakUse(POE->getSyntacticForm()); -- cgit v1.2.3