| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 138408
|
|
|
|
|
|
| |
and libStaticAnalyzer[*]. It was highly inconsistent, and very ugly to look at.
llvm-svn: 137537
|
|
|
|
|
|
|
|
| |
avoid recursion to subexpression.
This exposed bugs in the live variables analysis, and a latent analyzer bug in the SymbolReaper.
llvm-svn: 137006
|
|
|
|
| |
llvm-svn: 136679
|
|
|
|
|
|
|
|
|
|
|
|
| |
be linearized only when used by the static analyzer. This required a rewrite of LiveVariables, and exposed a ton of subtle bugs.
The motivation of this large change is to drastically simplify the logic in ExprEngine going forward.
Some fallout is that the output of some BugReporterVisitors is not as accurate as before; those will
need to be fixed over time. There is also some possible performance regression as RemoveDeadBindings
will be called frequently; this can also be improved over time.
llvm-svn: 136419
|
|
|
|
|
|
|
|
| |
LLVM.h imports
them into the clang namespace.
llvm-svn: 135852
|
|
|
|
|
|
|
|
| |
expressions (by calling IgnoreParens before adding expressions to blocks). Undo 132769 (LiveVariables' local IgnoreParens), since it's no longer necessary.
Also, have Environment stop looking through NoOp casts; it didn't match the behavior of LiveVariables. And once that's gone, the whole cast block of that switch is unnecessary.
llvm-svn: 132840
|
|
|
|
|
|
| |
liveness. Fixes the other half of PR8962.
llvm-svn: 132769
|
|
|
|
|
|
| |
<rdar://problem/8405222>.
llvm-svn: 125415
|
|
|
|
|
|
|
|
|
| |
at assignments. This 'relaxed' liveness is useful in path sensitive analysis for situations where the resulting extended liveness allows us to find some bugs.
- Added killAtAssign flag to LiveVariables
- Added relaxed LiveVariables to AnalysisContext with an accessor
llvm-svn: 112306
|
|
|
|
|
|
| |
to the new constants.
llvm-svn: 112047
|
|
|
|
| |
llvm-svn: 105452
|
|
|
|
|
|
|
| |
If an initializer in a DeclStmt references the declared variable, that
extends the liveness of that variable.
llvm-svn: 97624
|
|
|
|
|
|
|
| |
We may query their liveness because they are added to store when passing
argument values.
llvm-svn: 97562
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(1) libAnalysis is a generic analysis library that can be used by
Sema. It defines the CFG, basic dataflow analysis primitives, and
inexpensive flow-sensitive analyses (e.g. LiveVariables).
(2) libChecker contains the guts of the static analyzer, incuding the
path-sensitive analysis engine and domain-specific checks.
Now any clients that want to use the frontend to build their own tools
don't need to link in the entire static analyzer.
This change exposes various obvious cleanups that can be made to the
layout of files and headers in libChecker. More changes pending. :)
This change also exposed a layering violation between AnalysisContext
and MemRegion. BlockInvocationContext shouldn't explicitly know about
BlockDataRegions. For now I've removed the BlockDataRegion* from
BlockInvocationContext (removing context-sensitivity; although this
wasn't used yet). We need to have a better way to extend
BlockInvocationContext (and any LocationContext) to add
context-sensitivty.
llvm-svn: 94406
|
|
|
|
| |
llvm-svn: 92305
|
|
|
|
|
|
| |
hooks for the initialization of condition variables.
llvm-svn: 92119
|
|
|
|
| |
llvm-svn: 90028
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
variable by "capturing" them in a BlockExpr.
This required two changes:
1) Added 'getReferencedgetReferencedBlockVars()' to AnalysisContext so
that clients can iterate over the "captured" variables in a block.
2) Modified LiveVariables to take an AnalysisContext& in its
constructor and to call getReferencedgetReferencedBlockVars() when it
processes a BlockExpr*.
llvm-svn: 89924
|
|
|
|
|
|
| |
Patch by Victor Zverovich!
llvm-svn: 86638
|
|
|
|
|
|
| |
Patch by Kovarththanan Rajaratnam!
llvm-svn: 86343
|
|
|
|
| |
llvm-svn: 86260
|
|
|
|
|
|
| |
are updated.
llvm-svn: 84447
|
|
|
|
| |
llvm-svn: 84340
|
|
|
|
| |
llvm-svn: 81346
|
|
|
|
| |
llvm-svn: 76092
|
|
|
|
|
|
|
| |
Mark the super region of the binding of block level expr in the Environment
as live.
llvm-svn: 74525
|
|
|
|
|
|
|
|
|
|
| |
DeclStmt would be dead before the DeclStmt.
For example:
int x = 0;
int y = x;
'x' would be dead before 'int y = x'.
llvm-svn: 74522
|
|
|
|
|
|
|
|
|
|
|
|
| |
are considered 'live'. This hack isn't needed anymore because we have a
separation in the path-sensitive analyzer between variable names and bindings;
the analyzer can continue to reason about the storage of a variable after its
name is no longer directly referenced. Now the live variables analysis literally means "is this name live".
Along this line, update the dead stores checker to explicitly look for variables
whose values have escaped.
llvm-svn: 68504
|
|
|
|
| |
llvm-svn: 67923
|
|
|
|
|
|
|
|
|
|
|
| |
the liveness state of block-level expressions could oscillate because
of two issues:
- The initial value before a merge was not always set to "Top"
- The set of live block-level expressions is a union, not an intersection
This fixes <rdar://problem/650084>.
llvm-svn: 63421
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
as reported to the user and as manipulated by #line. This is what __FILE__,
__INCLUDE_LEVEL__, diagnostics and other things should follow (but not
dependency generation!).
This patch also includes several cleanups along the way:
- SourceLocation now has a dump method, and several other places
that did similar things now use it.
- I cleaned up some code in AnalysisConsumer, but it should probably be
simplified further now that NamedDecl is better.
- TextDiagnosticPrinter is now simplified and cleaned up a bit.
This patch is a prerequisite for #line, but does not actually provide
any #line functionality.
llvm-svn: 63098
|
|
|
|
|
|
|
| |
the "physical" location of tokens, refer to the "spelling" location.
This is more concrete and useful, tokens aren't really physical objects!
llvm-svn: 62309
|
|
|
|
|
|
| |
that functioned as the size of a VLA to be live.
llvm-svn: 60730
|
|
|
|
|
|
|
| |
- Block-expression for 'ObjCForCollectionStmt' is not alive before it occurs
- Recursively visit 'element' expression for ObjCForCollectionStmt to get liveness for referenced block-level expressions and variables.
llvm-svn: 59316
|
|
|
|
|
|
| |
or DeclRefExpr.
llvm-svn: 59290
|
|
|
|
|
|
| |
Update include files.
llvm-svn: 59284
|
|
|
|
| |
llvm-svn: 59222
|
|
|
|
|
|
| |
block-level "expressions".
llvm-svn: 59176
|
|
|
|
| |
llvm-svn: 59161
|
|
|
|
|
|
| |
constitute a 'use'.
llvm-svn: 59075
|
|
|
|
|
|
| |
expressions, both of values and types.
llvm-svn: 59057
|
|
|
|
| |
llvm-svn: 59053
|
|
|
|
| |
llvm-svn: 57910
|
|
|
|
|
|
| |
all dataflow analyses "see" the VLA size expressions.
llvm-svn: 56655
|
|
|
|
|
|
| |
Fixes <rdar://problem/6248086>
llvm-svn: 56645
|
|
|
|
|
|
|
|
| |
over the ScopedDecls of a DeclStmt.
Updated a few clients of DeclStmt::getNextDeclarator() to use decl_iterator instead. Will update other clients after additional testing.
llvm-svn: 54368
|
|
|
|
|
|
|
|
|
|
| |
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-July/002157.html
Essentially the observer mechanism in LiveVariables was observing block-level
expressions multiple times, leading to a case where the dead store checker could
see a value as dead when it was really live.
llvm-svn: 53115
|
|
|
|
|
|
| |
Patch by David Chisnall!
llvm-svn: 52422
|
|
|
|
|
|
|
|
|
|
|
| |
block's terminator.
Refactored LiveVariables to use getTerminatorCondition() in VisitTerminator().
Bug fix: CFG now computes Block-level expression numbers using information
from block terminators. This fixes <rdar://problem/5868189>.
llvm-svn: 49818
|