This reverts commit r354102.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@354109
91177308-0d34-0410-b5e6-
96231b3b80d8
// 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;
}
}
-void test4() {
- for (char c : "abc") // no-warning
- break;
-}
-
// PR 6130 - Don't warn about bogus unreachable code with throw's and
// temporary objects.
class PR6130 {