diff options
author | Sam McCall <sam.mccall@gmail.com> | 2019-02-15 09:18:49 +0000 |
---|---|---|
committer | Sam McCall <sam.mccall@gmail.com> | 2019-02-15 09:18:49 +0000 |
commit | 8575c876d62985f4d772038bf7f2ead653b484fa (patch) | |
tree | 757834eaede0e8913ca27f0c43fd1c8de7d3f2be /lib | |
parent | d2921c256fea81ed3622deaaed94b949037742a7 (diff) | |
download | clang-8575c876d62985f4d772038bf7f2ead653b484fa.tar.gz |
Revert "[Analysis] -Wunreachable-code shouldn't fire on the increment of a foreach loop"
This reverts commit r354102.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@354109 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Analysis/ReachableCode.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/lib/Analysis/ReachableCode.cpp b/lib/Analysis/ReachableCode.cpp index 6f1814deb0..cc64efa7f0 100644 --- a/lib/Analysis/ReachableCode.cpp +++ b/lib/Analysis/ReachableCode.cpp @@ -631,10 +631,6 @@ void DeadCodeScan::reportDeadCode(const CFGBlock *B, // a for/for-range loop. This is the block that contains // the increment code. if (const Stmt *LoopTarget = B->getLoopTarget()) { - // The increment on a foreach statement is not written. - if (isa<CXXForRangeStmt>(LoopTarget)) - return; - SourceLocation Loc = LoopTarget->getBeginLoc(); SourceRange R1(Loc, Loc), R2; |