| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
ReturnStmt unless we are in the top-level call frame. We can do more later, but this makes the checker self-consistent (and fixes a crash).
llvm-svn: 151426
|
|
|
|
|
|
| |
<rdar://problem/10640253>.
llvm-svn: 150892
|
|
|
|
|
|
| |
for functions called more than once.
llvm-svn: 150849
|
|
|
|
|
|
|
|
|
|
|
|
| |
(In response of Ted's review of r150112.)
This moves the logic which checked if a symbol escapes through a
parameter to invalidateRegionCallback (instead of post CallExpr visit.)
To accommodate the change, added a CallOrObjCMessage parameter to
checkRegionChanges callback.
llvm-svn: 150513
|
|
|
|
| |
llvm-svn: 149982
|
|
|
|
| |
llvm-svn: 149939
|
|
|
|
|
|
|
| |
(I was going to fix the TODO about DenseMap too, but
that would break self-host right now. See PR11922.)
llvm-svn: 149799
|
|
|
|
| |
llvm-svn: 149798
|
|
|
|
|
|
|
|
| |
include.
Fix all the transitive include users.
llvm-svn: 149783
|
|
|
|
|
|
|
|
| |
At this point this is largely cosmetic, but it opens the door to replace
ProgramStateRef with a smart pointer that more eagerly acts in the role
of reclaiming unused ProgramState objects.
llvm-svn: 149081
|
|
|
|
|
|
| |
appropriate or when GCC requires it)
llvm-svn: 148292
|
|
|
|
|
|
| |
This allows -Wswitch-enum to find switches that need updating when these enums are modified.
llvm-svn: 148281
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
entries map from
(Stmt*,LocationContext*) pairs to SVals instead of Stmt* to SVals.
This is needed to support basic IPA via inlining. Without this, we cannot tell
if a Stmt* binding is part of the current analysis scope (StackFrameContext) or
part of a parent context.
This change introduces an uglification of the use of getSVal(), and thus takes
two steps forward and one step back. There are also potential performance implications
of enlarging the Environment. Both can be addressed going forward by refactoring the
APIs and optimizing the internal representation of Environment. This patch
mainly introduces the functionality upon when we want to build upon (and clean up).
llvm-svn: 147688
|
|
|
|
| |
llvm-svn: 147505
|
|
|
|
|
|
| |
Robert Purves.
llvm-svn: 147139
|
|
|
|
|
|
|
|
| |
of relying on SymbolID.
This way any expression can be printed (not only SymbolData).
llvm-svn: 145829
|
|
|
|
|
|
|
|
| |
and name.
We are getting name of the called function or it's declaration in a few checkers. Refactor them to use the helper function in the CheckerContext.
llvm-svn: 145576
|
|
|
|
|
|
|
|
| |
indicate if a message was due to a property access. This can
potentially be refactored for other clients, and this is a regression from the refactoring of property acceses.
llvm-svn: 144571
|
|
|
|
|
|
| |
Remove unnecessary calls to CheckerContext::getPredecessor() + Comments.
llvm-svn: 143513
|
|
|
|
|
|
|
| |
CheckerContext::getPredecessor is only used to get to the LocationContext
half of the times.
llvm-svn: 143061
|
|
|
|
|
|
| |
Also document addTransition methods.
llvm-svn: 143059
|
|
|
|
|
|
|
|
| |
A step toward making sure that diagnostics report should only
be generated though the CheckerContext and not though BugReporter
or ExprEngine directly.
llvm-svn: 142947
|
|
|
|
|
|
|
|
|
| |
Remove dead members/parameters: ProgramState, respondsToCallback, autoTransition.
Remove addTransition method since it's the same as generateNode. Maybe we should
rename generateNode to genTransition (since a transition is always automatically
generated)?
llvm-svn: 142946
|
|
|
|
|
|
|
|
| |
Get rid of the EndOfPathBuilder completely.
Use the generic NodeBuilder to generate nodes.
Enqueue the end of path frontier explicitly.
llvm-svn: 142943
|
|
|
|
|
|
| |
ExprEngineBuilders is not used.
llvm-svn: 142450
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
responsible for generating the node frontier.
Currently we have a bunch of different node builders which provide some common
functionality but are difficult to refactor. Each builder generates nodes of
different kinds and calculates the frontier nodes, which should be propagated
to the next step (after the builder dies).
Introduce a new NodeBuilder which provides very basic node generation facilities
but takes care of the second problem. The idea is that all the other builders
will eventually use it. Use this builder in CheckerContext instead of
StmtNodeBuilder (the way the frontier is propagated to the StmtBuilder
is a hack and will be removed later on).
llvm-svn: 142443
|
|
|
|
|
|
|
|
| |
of a pointer.
Passing a pointer was a bad idea as it collides with the overload for void*.
llvm-svn: 141971
|
|
|
|
|
|
| |
method itself.
llvm-svn: 141262
|
|
|
|
|
|
| |
used when they were meant to be. Fixes <rdar://problem/10241614>.
llvm-svn: 141250
|
|
|
|
|
|
|
|
| |
well as the method itself.
Checkers should not directly access NodeBuilder, nodes can be created by calling the CheckerContext's generateNode() methods.
llvm-svn: 141249
|
|
|
|
|
|
| |
CheckerContext to generate the nodes.
llvm-svn: 141136
|
|
|
|
|
|
| |
can obtain block count directly from the Context.
llvm-svn: 141112
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of always storing all source locations for the selector identifiers
we check whether all the identifiers are in a "standard" position; "standard" position is
-Immediately before the arguments: -(id)first:(int)x second:(int)y;
-With a space between the arguments: -(id)first: (int)x second: (int)y;
-For nullary selectors, immediately before ';': -(void)release;
In such cases we infer the locations instead of storing them.
llvm-svn: 140989
|
|
|
|
|
|
|
|
|
|
|
|
| |
to take a FunctionDecl* instead of an llvm::StringRef. Eventually
we might push more logic in there, like using slightly different
conventions for C++ methods.
Also, fix a bug where 'copy' and 'create' were being caught in
non-camel-cased strings. We want copyFoo and CopyFoo and XCopy
but not Xcopy or xcopy.
llvm-svn: 140911
|
|
|
|
|
|
| |
precise error message on the modified test case (and prevents duplicate diagnostics when we purge at block granularity).
llvm-svn: 140840
|
|
|
|
|
|
|
|
| |
PathDiagnosticLocation(SourceLocation...) private. Most of the effort here goes to making BugReport refer to a PathDiagnosticLocation instead of FullSourceLocation.
(Another step closer to the goal of having Diagnostics which can recover from invalid SourceLocations.)
llvm-svn: 140182
|
|
|
|
|
|
|
|
|
| |
of SourceLocations (commit 2 of ?):
- Fix a fixme and move the logic of creating a PathDiagnosticLocation corresponding to a ProgramPoint into a PathDiagnosticLocation constructor.
- Rename PathDiagnosticLocation::create to differentiate from the added constructor.
llvm-svn: 139825
|
|
|
|
|
|
|
|
|
| |
of SourceLocations (commit 2 of ?):
- Modify all PathDiagnosticLocation constructors that take Stmt to also requre LocationContext.
- Add a constructor which should be used in case there is no valid statement/location (it will grab the location of the enclosing function).
llvm-svn: 139763
|
|
|
|
|
|
| |
valid object given an ExploadedNode (the same logic can be reused by other checkers).
llvm-svn: 139672
|
|
|
|
|
|
|
|
|
|
| |
language options. Use that .def file to declare the LangOptions class
and initialize all of its members, eliminating a source of annoying
initialization bugs.
AST serialization changes are next up.
llvm-svn: 139605
|
|
|
|
| |
llvm-svn: 139078
|
|
|
|
|
|
| |
And with that, TransferFuncs is gone!
llvm-svn: 139003
|
|
to RetainCountChecker...and clean up the file while I'm at it.
llvm-svn: 139002
|