]> granicus.if.org Git - clang/commit
[Sema] Make BreakContinueFinder handle nested loops.
authorEli Friedman <efriedma@codeaurora.org>
Tue, 4 Jul 2017 00:52:24 +0000 (00:52 +0000)
committerEli Friedman <efriedma@codeaurora.org>
Tue, 4 Jul 2017 00:52:24 +0000 (00:52 +0000)
commit9330fda9a0ef108d03334f20319508e409bb356d
treedece02aa81c3fbf7b160e602f56f633bb958f262
parent2ea9de261c4475b62359e9ac613fb1ca09676418
[Sema] Make BreakContinueFinder handle nested loops.

We don't care about break or continue statements that aren't
associated with the current loop, so make sure the visitor
doesn't find them.

Fixes https://bugs.llvm.org/show_bug.cgi?id=32648 .

Differential Revision: https://reviews.llvm.org/D34568

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307051 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaStmt.cpp
test/Sema/loop-control.c
test/SemaCXX/warn-loop-analysis.cpp