Commit Graph

13 Commits

Author SHA1 Message Date
John McCall 8322c3a197 Give some convenient idiomatic accessors to Stmt::child_range and
Stmt::const_child_range, then make a bunch of places use them instead
of the individual iterator accessors.

llvm-svn: 125450
2011-02-13 04:07:26 +00:00
Ted Kremenek b1c392aa56 Don't emit a dead store for '++' operations unless it occurs with a return statement. We've never seen any other cases that were real bugs.
Fixes <rdar://problem/6962292>.

llvm-svn: 125419
2011-02-12 00:17:19 +00:00
Ted Kremenek 43f50695a8 Add method ParentMap::addStmt().
llvm-svn: 119181
2010-11-15 20:54:24 +00:00
John McCall e302792b61 GCC didn't care for my attempt at API compatibility, so brute-force everything
to the new constants.

llvm-svn: 112047
2010-08-25 11:45:40 +00:00
Mike Stump 11289f4280 Remove tabs, and whitespace cleanups.
llvm-svn: 81346
2009-09-09 15:08:12 +00:00
Ted Kremenek d4dacb05cc Add ParentMap:getParentIgnoreParens().
llvm-svn: 71469
2009-05-11 19:49:27 +00:00
Ted Kremenek 90a6145ad1 Fix subtle bug in ParentMap::isConsumedExpr(): correctly ignore *parents* that
are ParenExpr or CastExprs.

llvm-svn: 71026
2009-05-05 22:16:12 +00:00
Ted Kremenek 042befd6d6 Another ParentMap bug: only the right side of a comma expression is consumed.
llvm-svn: 68680
2009-04-09 05:34:31 +00:00
Ted Kremenek d43aaad1b1 Fix bug in ParentMap::isConsumedExpr. A BinaryOperator always "consumes" the
value of its subexpressions unless it is a comma (in which case it doesn't
consume the left subexpression).

llvm-svn: 68628
2009-04-08 18:49:36 +00:00
Ted Kremenek 8b0dba358a Fix: <rdar://problem/6740387>. Sending nil to an object that returns a struct
should only be an error if that value is consumed. This fix was largely
accomplished by moving 'isConsumedExpr' back to ParentMap.

llvm-svn: 68195
2009-04-01 06:52:48 +00:00
Ted Kremenek e5fe617e2b Dead stores checker: Fix <rdar://problem/6506065> by being more selective when say that a store is dead even though the computed value is used in the enclosing expression.
llvm-svn: 62552
2009-01-20 00:47:45 +00:00
Daniel Dunbar 56fdb6ae69 More #include cleaning
- Kill unnecessary #includes in .cpp files. This is an automatic
   sweep so some things removed are actually used, but happen to be
   included by a previous header. I tried to get rid of the obvious
   examples and this was the easiest way to trim the #includes in one
   fell swoop.
 - We now return to regularly scheduled development.

llvm-svn: 54632
2008-08-11 06:23:49 +00:00
Ted Kremenek 99ecdd175d Added ParentMap, a class to represent a lazily constructed mapping from child to parents.
llvm-svn: 52553
2008-06-20 21:40:36 +00:00