Граф коммитов

13 Коммитов

Автор SHA1 Сообщение Дата
Ted Kremenek a0df99ff6f Changed behavior of how we handle "NULL" summaries: just call
GRSimpleVals::EvalCal(), and don't change reference counts.

Remove "getDoNothingSummary()", as a NULL summary does the same thing.

Added temporary hack for the "Get" rule for objects that return a pointer type:
treat them as non-owned CF objects.

Added test case to detect the release of a non-owned object.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49555 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-11 20:11:19 +00:00
Ted Kremenek bcf50ad8c7 Use RangedBugReport to report better ranges for reference count errors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49552 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-11 18:40:51 +00:00
Ted Kremenek 940b1d85d3 Fixed some logic errors in the CF ref count checker; we now can detect simple
use-after-release errors.  Added test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49509 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-10 23:44:06 +00:00
Ted Kremenek 61b9f870cc Simplify CF ref. count checker state machine.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49505 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-10 23:09:18 +00:00
Ted Kremenek 3ea0b6a087 Fix some bonehead bugs in summary generation in CFRefCount.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49503 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-10 22:58:08 +00:00
Ted Kremenek d71ed26dd8 Refactored all logic to run the GRSimpleVals and CFRef checker into a common
code path in the clang driver.

Renamed options --grsimple to -checker-simple and -check-cfref to -checker-cfref.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49500 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-10 22:16:52 +00:00
Ted Kremenek f84afb77a0 CFRefCount analysis now properly calls "EmitWarnings" after analyzing a function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49488 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-10 16:21:09 +00:00
Ted Kremenek 05cbe1a44e Hooked up initial reference-count checks to the BugReporter interface.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49455 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-09 23:49:11 +00:00
Ted Kremenek 50a6d0ce34 Major refactoring/cleanup of GRExprEngine, ExplodedGraph, and BugReporter.
Bugs are now reported using a combination of "BugType" (previously
BugDescription) and Bug "BugReport" objects, which are fed to BugReporter (which
generates PathDiagnostics). This provides a far more modular way of registering
bug types and plugging in diagnostics.

GRExprEngine now owns its copy of GRCoreEngine, and is not owned by the
ExplodedGraph.

ExplodedGraph is no longer templated on the "checker", but instead on the state
contained in the nodes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49453 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-09 21:41:14 +00:00
Ted Kremenek fa34b33e43 Added some boilerplate for emitting warnings from the CF-reference count checker.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49414 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-09 01:10:13 +00:00
Ted Kremenek 4dc41cc8de Inlined clang/Analysis/Analyses/GRSimpleVals.h into LocalCheckers.h and removed
GRSimpleVals.h

Added a PathDiagnosticClient option to the driver functions for the
CFRefCountChecker and the GRSimpleVals analysis. Both analyses now accept a "-o"
argument from the driver that specifies where HTML reports should be dumped.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48989 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-31 18:26:32 +00:00
Ted Kremenek 0e561a3e67 Rename "Nodify" to "MakeNode"
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48659 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-21 21:30:14 +00:00
Chris Lattner bda0b626e7 Make a major restructuring of the clang tree: introduce a top-level
lib dir and move all the libraries into it.  This follows the main
llvm tree, and allows the libraries to be built in parallel.  The
top level now enforces that all the libs are built before Driver,
but we don't care what order the libs are built in.  This speeds
up parallel builds, particularly incremental ones.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48402 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-15 23:59:48 +00:00