[PATCH] Mostly correct conditional handling for Consumed analysis

Christian Wailes chriswailes at google.com
Fri Aug 23 17:46:30 PDT 2013


Hi delesley, dblaikie, aaron.ballman,

* The TestedVarsVisitor was folded into the ConsumedStmtVisitor.
* The VarTestResult class was updated to allow these changes. * The PropagationInfo class was updated for the same reasons.
* Correctly handle short-circuiting of Boolean operations.
* Blocks are now marked as unreachable when we can statically prove we will never branch to them.
* Unreachable blocks are skipped by the analysis.

This is "mostly working" because some blocks that are unreachable aren't being marked as such.  This causes warnings to be issued when they shouldn't.  The warnings are still correct, but of no use as the code can never be reached.

http://llvm-reviews.chandlerc.com/D1501

Files:
  include/clang/Analysis/Analyses/Consumed.h
  lib/Analysis/Consumed.cpp
  test/SemaCXX/warn-consumed-analysis-strict.cpp
  test/SemaCXX/warn-consumed-analysis.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D1501.1.patch
Type: text/x-patch
Size: 49495 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130823/937428bb/attachment.bin>


More information about the cfe-commits mailing list