aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/GRSimpleVals.cpp
AgeCommit message (Collapse)Author
2008-05-05When reporting branch conditions that evaluate to an uninitialized value,Ted Kremenek
highlight the most nested subexpression that appears most responsible (giving the user better diagnostic feedback). Updated test cases to illustrate this feature. Implements: <rdar://problem/5880443> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50647 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-30Support implicit casts from pointers to references.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50498 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-30Teach more of the static analyzer about ObjCQualifiedIdType.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50494 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-30Handle lval::ArrayOffset and lval::FieldOffset in EvalNE and EvalEQ.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50486 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-23Fixed: <rdar://problem/5881148>Ted Kremenek
Problem: In the recently refactored VisitDeref (which processes dereferences), we were incorrectly skipping the node just generated for the subexpression of the dereference. This was a horrible regression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50176 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-22Added lval type (and tracking) for StringLiterals.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50109 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-18Generalize caching mechanism for bugs reports. Now individual BugTypesTed Kremenek
can decide the policy on how to cache related bugs. This allows us to properly to handle warning about multiple leaks in the same location in the ref count checker (not yet done). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49918 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-18Simplified internal logic of BugReporter, consolidating EmitWarning andTed Kremenek
EmitPathWarning into one method. We now properly handle emitting warnings without a PathDiagnosticClient when the warning does not involve a particular statement. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49884 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-15Added some comments to GRExprEngine. Reorder some of the method definitionsTed Kremenek
to start logically organizing them. Added initial plug-in transfer function support for Objective-C message expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49752 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-15Fix a compiler error on MSVC (variable name 'E' clash).Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49727 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-14Hooked up the dead-store checker to the BugReporter interface. Now dead-storeTed Kremenek
warnings are emitted as part of the warnings registered by GRSimpleVals. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49658 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-10Refactored all logic to run the GRSimpleVals and CFRef checker into a commonTed Kremenek
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-10Fixed regressions in error reporting due to copy-paste errors (using the "begin"Ted Kremenek
iterator instead of "end") and not implementing "getDescription()" for Nil argument checks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49485 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-09Major refactoring/cleanup of GRExprEngine, ExplodedGraph, and BugReporter.Ted Kremenek
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-06templates can't be static.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49258 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03Better range highlight for undefined-argument checks.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49184 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03When reporting "bad receiver" warnings, highlight the receiver.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49183 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03Hooked up GRSimpleAPICheck and the simple Objective-C Foundation checks to useTed Kremenek
the new BugReporter interface. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49180 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03Created new path-sensitive bug-reporting scheme based on the classesTed Kremenek
"BugReporter" and "BugDescription". BugDescription is used to describe a bug and provide pieces of the PathDiagnostic, and BugReporter creates the actual PathDiagnostic by crawling through the ExplodedGraph. Migrated checks done by GRSimpleVals to be reported using the new BugReporter mechanism. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49127 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-0280 col violationTed Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49120 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02Added more PathDiagnostic rendering for terminators: switch, goto, loops.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49119 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02Shorted bug-description.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49102 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02simplify some code by using PointerLikeType.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49101 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02Beginning of some cleanups; start generating path diagnostics using objectsTed Kremenek
that describe a bug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49086 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02Added initial hacked support for display path diagnostics withTed Kremenek
GRSimpleVals warnings. Cleaning up, but now we get multiple bubbles (branches are annotated). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49077 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-01Patch by Argiris Kirtzidis: Fix a dangling pointer error!Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49057 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-31Do not prepend the keyword "[CHECKER]" to checker messages when usingTed Kremenek
a PathDiagnosticClient. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48996 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-31Include ranges in GRSimpleVals diagnostics.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48990 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-31Inlined clang/Analysis/Analyses/GRSimpleVals.h into LocalCheckers.h and removedTed Kremenek
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-31Added path-sensitive check for return statements that return the addressTed Kremenek
of a stack variable. This is the path-sensitive version of a check that is already done during semantic analysis. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48980 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-27Hooked up initial NSString interface checking to GRSimpleVals.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48895 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-27Add creation of BasicObjCFoundationChecks when running GRSimpleVals from the ↵Ted Kremenek
driver. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48886 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-25GRSimple analysis now outputs additional diagnostic warnings aboutTed Kremenek
passing an uninitialized value to a message expresion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48776 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-21Rename "Nodify" to "MakeNode"Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48659 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-15Make a major restructuring of the clang tree: introduce a top-levelChris Lattner
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