| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
to SValuator::EvalCast. In the process, the StoreManagers now use this new cast
machinery, and the hack in GRExprEngine::EvalBind to handle implicit casts
involving OSAtomicCompareAndSwap and friends has been removed (and replaced with
logic closer to the logic specific to those functions).
llvm-svn: 76641
|
| |
|
|
|
|
| |
locs and vis versa.
llvm-svn: 76483
|
| |
|
|
| |
llvm-svn: 76466
|
| |
|
|
|
|
|
|
| |
where the true or false CFGBlock* for a branch could be NULL. This will handle
the case where we can determine during CFG construction that a branch is
infeasible.
llvm-svn: 76450
|
| |
|
|
| |
llvm-svn: 76262
|
| |
|
|
|
|
|
|
|
| |
until Doug Gregor's Type smart pointer code lands (or more discussion occurs).
These methods just call the new Type::getAs<XXX> methods, so we still have
reduced implementation redundancy. Having explicit getAsXXXType() methods makes
it easier to set breakpoints in the debugger.
llvm-svn: 76193
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This method is intended to eventually replace the individual
Type::getAsXXXType<> methods.
The motivation behind this change is twofold:
1) Reduce redundant implementations of Type::getAsXXXType() methods. Most of
them are basically copy-and-paste.
2) By centralizing the implementation of the getAs<Type> logic we can more
smoothly move over to Doug Gregor's proposed canonical type smart pointer
scheme.
Along with this patch:
a) Removed 'Type::getAsPointerType()'; now clients use getAs<PointerType>.
b) Removed 'Type::getAsBlockPointerTypE()'; now clients use getAs<BlockPointerType>.
llvm-svn: 76098
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
(1) Moved the SValuator object from GRExprEngine to ValueManager. This
allows ValueManager to use the SValuator when creating SVals.
(2) Added ValueManager::makeArrayIndex() and
ValueManager::convertToArrayIndex(), two SVal creation methods
that will help RegionStoreManager always have a consistent set of
SVals with the same integer size and type when reasoning about
array indices.
llvm-svn: 75882
|
| |
|
|
|
|
|
|
| |
invalidate the region correctly. It uses the cast-to type to invalidate
the region when available. To avoid invalid cast-to type like 'void*' or 'id',
region store now only records non-generic casts of regions.
llvm-svn: 75580
|
| |
|
|
|
|
|
|
| |
void* values that are bound
to symbolic regions and then treated like integers.
llvm-svn: 75356
|
| |
|
|
|
|
|
|
|
| |
The implementations of these methods can Use Decl::getASTContext() to get the ASTContext.
This commit touches a lot of files since call sites for these methods are everywhere.
I used pre-tokenized "carbon.h" and "cocoa.h" headers to do some timings, and there was no real time difference between before the commit and after it.
llvm-svn: 74501
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This is simple enough, but then I thought it would be nice to make PrintingPolicy
get a LangOptions so that various things can key off "bool" and "C++" independently.
This spiraled out of control. There are many fixme's, but I think things are slightly
better than they were before.
One thing that can be improved: CFG should probably have an ASTContext pointer in it,
which would simplify its clients.
llvm-svn: 74493
|
| |
|
|
| |
llvm-svn: 74245
|