summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/GRExprEngine.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Really noreturn on exceptions.Ted Kremenek2008-05-021-3/+3
| | | | llvm-svn: 50579
* Added temporary fix for Obj-C exception handling in the static analyzer: ↵Ted Kremenek2008-05-011-4/+72
| | | | | | treat these as panic functions. llvm-svn: 50535
* Added __assert_rtn to list of panic functions.Ted Kremenek2008-05-011-0/+4
| | | | llvm-svn: 50530
* Added ziperr as a panic function. Eventually inter-procedural analysisTed Kremenek2008-05-011-0/+5
| | | | | | should catch this one easily. llvm-svn: 50526
* Add placeholder code in the static analyzer for MemberExprs involving struct ↵Ted Kremenek2008-04-301-10/+45
| | | | | | temporaries. llvm-svn: 50502
* Add workaround for __builtin_offsetof in the static analyzer.Ted Kremenek2008-04-301-0/+6
| | | | llvm-svn: 50500
* Provide SizeOfAlignTypeExpr workaround in the static analyzer for taking the ↵Ted Kremenek2008-04-301-0/+6
| | | | | | sizeof of a ObjCInterfaceType. llvm-svn: 50499
* When creating LVals for array entries, canonicalize entries with a 0 index.Ted Kremenek2008-04-301-1/+9
| | | | llvm-svn: 50497
* Teach more of the static analyzer about ObjCQualifiedIdType.Ted Kremenek2008-04-301-4/+0
| | | | llvm-svn: 50494
* Teach the static analysis engine about ObjCQualifiedIdType.Ted Kremenek2008-04-301-8/+12
| | | | llvm-svn: 50493
* Add conjured symbols for decl initializations.Ted Kremenek2008-04-301-3/+22
| | | | | | Add db_error as panic function. llvm-svn: 50489
* Invalidate old subexpression bindings when binding UnknownVal.Ted Kremenek2008-04-301-3/+7
| | | | llvm-svn: 50466
* Add lval::ArrayOffset, which represent the locations of entries in an array.Ted Kremenek2008-04-291-62/+26
| | | | llvm-svn: 50453
* Added lval::FieldOffset, which represents symbolic lvalues for field offsets ↵Ted Kremenek2008-04-291-16/+11
| | | | | | | | from other Lvalues. This removes the failure in null-deref-ps.c (test suite). llvm-svn: 50449
* Major rewrite/refactoring of static analysis engine. We now useTed Kremenek2008-04-291-559/+542
| | | | | | | | | | | | EvalStore/EvalLoad to handle all loads/stores from symbolic memory, allowing us to do checks for null dereferences, etc., at any arbitrary load/store (these were missed checks before). This also resulted in some major cleanups, some conceptual, and others just in the structure of the code. This temporarily introduces a regression in the test suite (null-deref-ps.c) before I add a new LVal type for structure fields. llvm-svn: 50443
* Do a better job at computing dead symbols.Ted Kremenek2008-04-251-2/+2
| | | | | | | | | Implemented support for better localized leaks in the CF reference count checker. Now leaks should be flagged close to where they occur. This should implement the desired functionality in <rdar://problem/5879592>, although the diagnostics still need to be improved. llvm-svn: 50241
* More boilerplate for handling specialized-transfer function logic for dead ↵Ted Kremenek2008-04-241-29/+32
| | | | | | symbols. llvm-svn: 50233
* Added initial boilerplate in GRExprEngine to allow checker-specific transferTed Kremenek2008-04-241-4/+25
| | | | | | function logic to act when symbols become dead. llvm-svn: 50221
* Fixed: <rdar://problem/5881148>Ted Kremenek2008-04-231-80/+54
| | | | | | | | | | 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. llvm-svn: 50176
* Remove false path where the default branch in a switch statement wouldTed Kremenek2008-04-231-2/+5
| | | | | | always be taken even if it was not feasible. llvm-svn: 50132
* Added panic function "assfail".Ted Kremenek2008-04-231-0/+4
| | | | llvm-svn: 50119
* Rewrote VisitDeclStmt to properly handle initializers that can do anything.Ted Kremenek2008-04-221-54/+84
| | | | llvm-svn: 50112
* Added lval type (and tracking) for StringLiterals.Ted Kremenek2008-04-221-0/+1
| | | | llvm-svn: 50109
* Added "nonlval::LValAsInteger" to represent abstract LVals casted to ↵Ted Kremenek2008-04-221-5/+51
| | | | | | integers, allowing us to track lvals when they are casted back to pointers. llvm-svn: 50108
* Added panic function "dtrace_assfail".Ted Kremenek2008-04-221-0/+5
| | | | llvm-svn: 50091
* Hardcode "Assert" as a no-return function (panic).Ted Kremenek2008-04-221-0/+4
| | | | llvm-svn: 50089
* Added null-dereference check for ArraySubscriptExpr.Ted Kremenek2008-04-221-1/+35
| | | | llvm-svn: 50083
* Added support for detected bad dereferences involving MemberExprs, e.g. x->f ↵Ted Kremenek2008-04-211-77/+123
| | | | | | where "x" is NULL. llvm-svn: 50071
* Fixed more caching bugs related to the one fixed in r49914. SilenceTed Kremenek2008-04-181-11/+26
| | | | | | compiler warning introduced by a recent patch of mine. llvm-svn: 49917
* Fixed elusive caching bug that led to false positives.Ted Kremenek2008-04-181-1/+2
| | | | llvm-svn: 49914
* Added "GetErrorNodes()" to BugType so that -trim-egraph can recognize errorsTed Kremenek2008-04-181-4/+15
| | | | | | | | from registered BugTypes. This helps with debugging. Add detection of NULL values in ref count checker; this suppresses false positives. llvm-svn: 49912
* Added "EvalAssume" virtual method to GRTransferFuncs; this is for evaluatingTed Kremenek2008-04-181-7/+20
| | | | | | the checker-specific logic of symbolic assumptions. llvm-svn: 49910
* Handle ReturnStmts by dispatching to "EvalReturn" in the transfer function ↵Ted Kremenek2008-04-161-9/+28
| | | | | | object. llvm-svn: 49826
* Small tweaks to EvalStore: pass an "RVal" instead of "LVal" for the TargetLV toTed Kremenek2008-04-161-12/+6
| | | | | | represent possible stores to "Unknown." llvm-svn: 49811
* Hook up "EvalStore" from GRTransferFuncs to GRExprEngine.Ted Kremenek2008-04-161-3/+20
| | | | llvm-svn: 49804
* Take first step to migrating handling of "stores" to values from GRExprEngineTed Kremenek2008-04-161-3/+8
| | | | | | to the plug-in GRTransferFuncs object. llvm-svn: 49801
* Added some comments to GRExprEngine. Reorder some of the method definitionsTed Kremenek2008-04-151-316/+365
| | | | | | | | to start logically organizing them. Added initial plug-in transfer function support for Objective-C message expressions. llvm-svn: 49752
* Remove FileVarDecl and BlockVarDecl. They are replaced by ↵Steve Naroff2008-04-151-1/+1
| | | | | | | | VarDecl::isBlockVarDecl() and VarDecl::isFileVarDecl(). This is a fairly mechanical/large change. As a result, I avoided making any changes/simplifications that weren't directly related. I did break two Analysis tests. I also have a couple FIXME's in UninitializedValues.cpp. Ted, can you take a look? If the bug isn't obvious, I am happy to dig in and fix it (since I broke it). llvm-svn: 49748
* Fixed some logic errors in the CF ref count checker; we now can detect simpleTed Kremenek2008-04-101-0/+2
| | | | | | use-after-release errors. Added test case. llvm-svn: 49509
* Major refactoring/cleanup of GRExprEngine, ExplodedGraph, and BugReporter.Ted Kremenek2008-04-091-0/+62
| | | | | | | | | | | | | | | 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. llvm-svn: 49453
* simplify some code by using PointerLikeType.Chris Lattner2008-04-021-1/+1
| | | | llvm-svn: 49101
* Added path-sensitive check for return statements that return the addressTed Kremenek2008-03-311-8/+46
| | | | | | | of a stack variable. This is the path-sensitive version of a check that is already done during semantic analysis. llvm-svn: 48980
* Hooked up initial NSString interface checking to GRSimpleVals.Ted Kremenek2008-03-271-4/+4
| | | | llvm-svn: 48895
* Added "GRAuditor" and "GRSimpleAPICheck" interface to allow simple stateless ↵Ted Kremenek2008-03-271-0/+13
| | | | | | | | | checkers to be injected into the analyzer. Added "AnnotatedPath" class to record an annotated path that will be useful for inspecting paths. Added some boilerplate code for simple checks of Apple's Foundation API. llvm-svn: 48867
* Bug fix: use GetRVal instead of GetLVal (were getting the value of a ↵Ted Kremenek2008-03-261-1/+1
| | | | | | DeclRefExpr, not it's address). llvm-svn: 48846
* Bug fix in transfer function for ObjCMessageExpr: Visit the receiver ↵Ted Kremenek2008-03-261-1/+1
| | | | | | expression as an ordinary expression, not using VisitLVal. llvm-svn: 48842
* Tweak to transfer function for ObjCMessageExpr: handle both instance methodsTed Kremenek2008-03-251-66/+70
| | | | | | and message expressions with a specified receiver. llvm-svn: 48773
* Added logic to check for uninitialized values as the receivers for message ↵Ted Kremenek2008-03-251-8/+64
| | | | | | | | expressions and uninitialized values passed-by-value as arguments to message expressions. llvm-svn: 48760
* Added initial transfer function support for ObjCMessageExpr.Ted Kremenek2008-03-251-0/+41
| | | | llvm-svn: 48757
* Rename "Nodify" to "MakeNode"Ted Kremenek2008-03-211-25/+27
| | | | llvm-svn: 48659
OpenPOWER on IntegriCloud