Fix false positives for for-loop-analysis warning
authorSteven Wu <stevenwu@apple.com>
Thu, 10 Mar 2016 02:02:48 +0000 (02:02 +0000)
committerSteven Wu <stevenwu@apple.com>
Thu, 10 Mar 2016 02:02:48 +0000 (02:02 +0000)
commit92910f69a06e299beafb537ca08bc63e75a38612
treeefec00fb23fa0cb706f34db8bb4cd446de8ad42e
parent09b4a8daa354382c294e736fc9db018621376728
Fix false positives for for-loop-analysis warning

Summary:
For PseudoObjectExpr, the DeclMatcher need to search only all the semantics
but also need to search pass OpaqueValueExpr for all potential uses for the
Decl.

Reviewers: thakis, rtrieu, rjmccall, doug.gregor

Subscribers: xazax.hun, rjmccall, doug.gregor, cfe-commits

Differential Revision: http://reviews.llvm.org/D17627

llvm-svn: 263087
clang/lib/Sema/SemaStmt.cpp
clang/test/SemaObjC/warn-loop-analysis.m [new file with mode: 0644]