]> granicus.if.org Git - clang/commit
Consumed analysis: improve loop handling. The prior version of the analysis
authorDeLesley Hutchins <delesley@google.com>
Wed, 9 Oct 2013 18:30:24 +0000 (18:30 +0000)
committerDeLesley Hutchins <delesley@google.com>
Wed, 9 Oct 2013 18:30:24 +0000 (18:30 +0000)
commit7385840b600d0e4a96d75042f612f6430e4a0390
treebf2ac3359b2da0d5cf5854d9a87037b31648e1f8
parentd4099c3348589e845f9f4666fb0b8ef9b7a4a796
Consumed analysis: improve loop handling.  The prior version of the analysis
marked all variables as "unknown" at the start of a loop.  The new version
keeps the initial state of variables unchanged, but issues a warning if the
state at the end of the loop is different from the state at the beginning.
This patch will eventually be replaced with a more precise analysis.

Initial patch by chris.wailes@gmail.com.  Reviewed and edited by
delesley@google.com.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192314 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Analysis/Analyses/Consumed.h
include/clang/Basic/DiagnosticSemaKinds.td
lib/Analysis/Consumed.cpp
lib/Sema/AnalysisBasedWarnings.cpp
test/SemaCXX/warn-consumed-analysis.cpp