| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
llvm-svn: 84073
|
| |
|
|
|
|
| |
* Make all Base value the last argument.
llvm-svn: 84071
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
adding assert
This fix required a few changes:
SimpleSValuator:
- Eagerly replace a symbolic value with its constant value in EvalBinOpNN
when it is constrained to a constant. This allows us to better constant fold
values along a path.
- Handle trivial case of '<', '>' comparison of pointers when the two pointers
are exactly the same.
RegionStoreManager:
llvm-svn: 83358
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
<rdar://problem/6914474> checker doesn't realize that variable might
have been assigned if a pointer to that variable was passed to another
function via a structure
The problem here was the RegionStoreManager::InvalidateRegion didn't
invalidate the bindings of invalidated regions. This required a
rewrite of this method using a worklist.
As part of this fix, changed ValueManager::getConjuredSymbolVal() to
require a 'void*' SymbolTag argument. This tag is used to
differentiate two different symbols created at the same location.
llvm-svn: 82920
|
| |
|
|
|
|
| |
GRExprEngine::VisitDeclRefExpr without 'asLValue' being true).
llvm-svn: 82598
|
| |
|
|
|
|
| |
floats not honored
llvm-svn: 82575
|
| |
|
|
|
|
|
|
|
|
|
| |
Several of the existing methods were identical to their respective
specializations, and so have been removed entirely. Several more 'leaf'
optimizations were introduced.
The getAsFoo() methods which imposed extra conditions, like
getAsObjCInterfacePointerType(), have been left in place.
llvm-svn: 82501
|
| |
|
|
|
|
| |
now down by a 'Checker' and not build into GRExprEngine.
llvm-svn: 82017
|
| |
|
|
|
|
|
|
|
| |
__builtin_offsetof in the static analyzer that __builtin_offsetof is
not guaranteed to return an integer constant. We will need to shore
this up later, but now at least we have correct support for when this
*is* an integer constant.
llvm-svn: 81830
|
| |
|
|
| |
llvm-svn: 81820
|
| |
|
|
| |
llvm-svn: 81590
|
| |
|
|
|
|
|
|
|
|
|
|
| |
to statically type various methods in SValuator/GRState as required either a
defined value or a defined-but-possibly-unknown value. This leads to various
logic cleanups in GRExprEngine, and lets the compiler enforce via type checking
our assumptions about what symbolic values are possibly undefined and what are
not.
Along the way, clean up some of the static analyzer diagnostics regarding the uses of uninitialized values.
llvm-svn: 81579
|
| |
|
|
|
|
| |
local node information.
llvm-svn: 81433
|
| |
|
|
|
|
|
|
|
|
|
| |
upon entry to a method
Here we implement this as a precondition within GRExprEngine, even though it is
related to how BasicStoreManager and RegionStoreManager model 'self'
differently. Putting this as a high-level precondition is more general, which is
why it isn't in RegionStore.cpp.
llvm-svn: 81378
|
| |
|
|
| |
llvm-svn: 81346
|
| |
|
|
| |
llvm-svn: 81066
|
| |
|
|
| |
llvm-svn: 81061
|
| |
|
|
| |
llvm-svn: 80980
|
| |
|
|
| |
llvm-svn: 80979
|
| |
|
|
| |
llvm-svn: 80873
|
| |
|
|
|
|
|
|
|
| |
Also fix a checker context bug: the Dst set is not always empty initially.
Because in GRExprEngine::CheckerVisit(), *CurrSet is used repeatedly.
So we removed the Dst.empty() condition in ~CheckerContext() when deciding
whether to do autotransision.
llvm-svn: 80786
|
| |
|
|
|
|
| |
Now bad callee is checked as a PreVisit to the CallExpr.
llvm-svn: 80771
|
| |
|
|
|
|
|
|
| |
space within the MemberExpr for the nested-name-specifier and its
source range. We'll do the same thing with explicitly-specified
template arguments, assuming I don't flip-flop again.
llvm-svn: 80642
|
| |
|
|
|
|
|
| |
also be adding explicit template arguments as an additional
"adornment". No functionality change.
llvm-svn: 80628
|
| |
|
|
| |
llvm-svn: 80417
|
| |
|
|
| |
llvm-svn: 80294
|
| |
|
|
| |
llvm-svn: 80226
|
| |
|
|
|
|
| |
greatly simplifying the logic of the analyzer in many places. We now only distinguish between block-level expressions and subexpressions in Environment::RemoveDeadBindings and GRState pretty-printing.
llvm-svn: 80194
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
name, e.g.,
x->Base::f()
retain the qualifier (and its source range information) in a new
subclass of MemberExpr called CXXQualifiedMemberExpr. Provide
construction, transformation, profiling, printing, etc., for this new
expression type.
When a virtual function is called via a qualified name, don't emit a
virtual call. Instead, call that function directly. Mike, could you
add a CodeGen test for this, too?
llvm-svn: 80167
|
| |
|
|
| |
llvm-svn: 80018
|
| |
|
|
|
|
|
| |
Now AnalysisManager is the only place we can get CodeDecl.
This leads to an API change: GRState::bindExpr() now takes the CFG argument.
llvm-svn: 79980
|
| |
|
|
| |
llvm-svn: 79973
|
| |
|
|
| |
llvm-svn: 79854
|
| |
|
|
|
|
|
| |
AnalysisContext should never change. Along the way, propagate some constness
around.
llvm-svn: 79701
|
| |
|
|
|
|
| |
analysis.
llvm-svn: 79680
|
| |
|
|
| |
llvm-svn: 79591
|
| |
|
|
|
|
|
|
| |
"ObjCImplctSetterGetterRefExpr".
A field rename and more comments.
llvm-svn: 79537
|
| |
|
|
|
|
|
|
| |
Removed an unnecessary loop to get to setters incoming
argument. Added DoxyGen comments. Still more work
to do in this area (WIP).
llvm-svn: 79365
|
| |
|
|
|
|
|
| |
of GRStateManager and GRExprEngine, pass the initial location context
to the getInitialState() method.
llvm-svn: 79228
|
| |
|
|
|
|
|
| |
which is either a stack frame context of the function or a local scope
context.
llvm-svn: 79072
|
| |
|
|
|
|
| |
Some Builders need further cleanup.
llvm-svn: 78301
|
| |
|
|
|
|
|
| |
and their impl base classes. This can greatly simply some code of the core
analysis engine. This patch merges ExplodedNodeImpl into ExplodedNode.
llvm-svn: 78270
|
| |
|
|
|
|
|
|
|
| |
constant value. If the UnaryOperator has location type, create the
constant with int type and pointer width.
This fixes the bug that all pointer increments 'p++' evaluated to Unknown.
llvm-svn: 78147
|
| |
|
|
|
|
| |
not work quite right with the changes I'm about to commit.
llvm-svn: 77779
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Type::getAsReferenceType() -> Type::getAs<ReferenceType>()
Type::getAsRecordType() -> Type::getAs<RecordType>()
Type::getAsPointerType() -> Type::getAs<PointerType>()
Type::getAsBlockPointerType() -> Type::getAs<BlockPointerType>()
Type::getAsLValueReferenceType() -> Type::getAs<LValueReferenceType>()
Type::getAsRValueReferenceType() -> Type::getAs<RValueReferenceType>()
Type::getAsMemberPointerType() -> Type::getAs<MemberPointerType>()
Type::getAsReferenceType() -> Type::getAs<ReferenceType>()
Type::getAsTagType() -> Type::getAs<TagType>()
And remove Type::getAsReferenceType(), etc.
This change is similar to one I made a couple weeks ago, but that was partly
reverted pending some additional design discussion. With Doug's pending smart
pointer changes for Types, it seemed natural to take this approach.
llvm-svn: 77510
|
| |
|
|
|
|
|
|
|
| |
could cause false positives if any the subexpressions had side-effects. These
initializers weren't evaluated because the StoreManager would need to handle
them, but that's an orthogonal problem of whether or not the StoreManager can
handle the binding.
llvm-svn: 77361
|
| |
|
|
|
|
|
|
| |
--- Reverse-merging r76831 into '.':
U include/clang/Analysis/PathSensitive/GRExprEngine.h
U lib/Analysis/GRExprEngine.cpp
llvm-svn: 76851
|
| |
|
|
| |
llvm-svn: 76831
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Educate GRExprEngine::VisitGraph() about 'PreStmt'.
Mark the constructor of 'PostStmt' to be explicit, preventing implicit
conversions and the selection of the wrong 'generateNode' method in
GRStmtNodeBuilder.
Constify a bunch of arguments, which falls out of the changes to ProgramPoint.
llvm-svn: 76809
|
| |
|
|
|
|
| |
Add a 'previsit' stage (that dispatches to registered Checkers) when evaluating the effects of CallExprs.
llvm-svn: 76794
|