| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
llvm-svn: 125443
|
| |
|
|
|
|
| |
within an 'init' method. This is a temporary stop gap to avoid false positives while we investigate how to make it smarter.
llvm-svn: 125427
|
| |
|
|
|
|
|
|
| |
statement. We've never seen any other cases that were real bugs.
Fixes <rdar://problem/6962292>.
llvm-svn: 125419
|
| |
|
|
|
|
| |
<rdar://problem/8405222>.
llvm-svn: 125415
|
| |
|
|
| |
llvm-svn: 125395
|
| |
|
|
| |
llvm-svn: 125275
|
| |
|
|
|
|
|
|
| |
'include/clang/StaticAnalyzer/Core' and 'include/clang/StaticAnalyzer/Checkers'.
This layout matches lib/StaticAnalyzer, which corresponds to two StaticAnalyzer libraries.
llvm-svn: 125251
|
| |
|
|
| |
llvm-svn: 125217
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
there were only three virtual methods of any significance.
The primary way to grab child iterators now is with
Stmt::child_range children();
Stmt::const_child_range children() const;
where a child_range is just a std::pair of iterators suitable for
being llvm::tie'd to some locals. I've left the old child_begin()
and child_end() accessors in place, but it's probably a substantial
penalty to grab the iterators individually now, since the
switch-based dispatch is kindof inherently slower than vtable
dispatch. Grabbing them together is probably a slight win over the
status quo, although of course we could've achieved that with vtables, too.
I also reclassified SwitchCase (correctly) as an abstract Stmt
class, which (as the first such class that wasn't an Expr subclass)
required some fiddling in a few places.
There are somewhat gross metaprogramming hooks in place to ensure
that new statements/expressions continue to implement
getSourceRange() and children(). I had to work around a recent clang
bug; dgregor actually fixed it already, but I didn't want to
introduce a selfhosting dependency on ToT.
llvm-svn: 125183
|
| |
|
|
|
|
|
|
|
|
|
|
| |
sqlite3 by 7-10% by recylcing "uninteresting" ExplodedNodes.
The optimization involves eagerly pruning ExplodedNodes from the ExplodedGraph that contain
practically no difference between the predecessor and successor nodes. For example, if
the state is different between a predecessor and a node, the node is left in. Only for
the 'environment' component of the state do we not care if the ExplodedNodes are different.
This paves the way for future optimizations where we can reclaim the environment objects.
llvm-svn: 125154
|
| |
|
|
|
|
|
| |
Eventually there will also be a lib/StaticAnalyzer/Frontend that will handle initialization and checker registration.
Yet another library to avoid cyclic dependencies between Core and Checkers.
llvm-svn: 125124
|
| |
|
|
|
|
| |
lib/StaticAnalyzer/Checkers/ExperimentalChecks.cpp
llvm-svn: 125123
|
| |
|
|
|
|
| |
lib/StaticAnalyzer/Checkers/ExperimentalChecks.h
llvm-svn: 125122
|
| |
|
|
|
|
| |
lib/StaticAnalyzer/Checkers/InternalChecks.h
llvm-svn: 125121
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A common pattern in classes with multiple initializers is to put the
subclass's common initialization bits into a static function that receives
the value of 'self', e.g:
if (!(self = [super init]))
return nil;
if (!(self = _commonInit(self)))
return nil;
It was reported that 'self' was not set to the result of [super init].
Until we can use inter-procedural analysis, in such a call, transfer the
ObjCSelfInitChecker flags associated with 'self' to the result of the call.
Fixes rdar://8937441 & http://llvm.org/PR9094
llvm-svn: 124940
|
| |
|
|
| |
llvm-svn: 124822
|
| |
|
|
|
|
|
| |
on, as well as more reliably limiting invalid references to locals from
nested scopes.
llvm-svn: 124721
|
| |
|
|
| |
llvm-svn: 124680
|
| |
|
|
| |
llvm-svn: 124674
|
| |
|
|
| |
llvm-svn: 124376
|
| |
|
|
|
|
|
|
| |
'-analyzer-check-objc-self-init' which by default
is enabled by the driver for '--analyze'.
llvm-svn: 124266
|
| |
|
|
| |
llvm-svn: 124263
|
| |
|
|
|
|
| |
Jean-Daniel Dupas!
llvm-svn: 124249
|
| |
|
|
|
|
|
|
| |
by ExplodedNodes. This leads to about a 4-8%
reduction in memory footprint when analyzing
functions in sqlite3.
llvm-svn: 124214
|
| |
|
|
|
|
|
| |
for a block capturing the value of an uninitialized
variable.
llvm-svn: 124212
|
| |
|
|
|
|
|
|
|
|
| |
We translate property accesses to obj-c messages by simulating "loads" or "stores" to properties
using a pseudo-location SVal kind (ObjCPropRef).
Checkers can now reason about obj-c messages for both explicit message expressions and implicit
messages due to property accesses.
llvm-svn: 124161
|
| |
|
|
|
|
|
|
| |
ObjCMessages (both message expressions and property access)
and use it in ExprEngine::VisitObjCMessageExpr.
llvm-svn: 124160
|
| |
|
|
|
|
|
|
|
|
| |
expressions and implicit
messages that are sent for handling properties in dot syntax.
Replace all direct uses of ObjCMessageExpr in the checkers and checker interface with ObjCMessage.
llvm-svn: 124159
|
| |
|
|
|
|
| |
BasicObjCFoundationChecks.cpp; no functionality change.
llvm-svn: 124157
|
| |
|
|
|
|
| |
and methods defined within 'namespace X { ... }'.
llvm-svn: 123921
|
| |
|
|
|
|
| |
thousand other things which were (generally inadvertantly) relying on that.
llvm-svn: 123814
|
| |
|
|
|
|
| |
-Wint-to-pointer-cast.
llvm-svn: 123719
|
| |
|
|
|
|
| |
Joerg Sonnenberger!
llvm-svn: 123669
|
| |
|
|
|
|
|
|
|
| |
that captures the substitution of a non-type template argument pack
for a non-type template parameter pack within a pack expansion that
cannot be fully expanded. This follows the approach taken by
SubstTemplateTypeParmPackType.
llvm-svn: 123506
|
| |
|
|
|
|
| |
Found by clang static analyzer.
llvm-svn: 123485
|
| |
|
|
| |
llvm-svn: 123460
|
| |
|
|
| |
llvm-svn: 123459
|
| |
|
|
| |
llvm-svn: 123395
|
| |
|
|
|
|
|
|
| |
dead stores within nested assignments. I have
never seen an actual bug found by this specific
warning, and it can lead to many false positives.
llvm-svn: 123394
|
| |
|
|
|
|
|
| |
since the bindings are purged after they are set up. Need to investigate
RemoveDeadBindings algorithm.
llvm-svn: 123374
|
| |
|
|
|
|
|
|
|
| |
and 'getBasePredecessor()' to 'getPredecessor()'.
Also remove a unneeded save-and-restore of
node builder's tag field.
llvm-svn: 123363
|
| |
|
|
|
|
| |
node builder's 'HasGeneratedNode' field.
llvm-svn: 123362
|
| |
|
|
|
|
|
|
|
| |
methods to verify that they assign 'self' to the
result of an initialization call (e.g. [super init], or [self initWith..]) before using any instance variable or
returning 'self'.
llvm-svn: 123264
|
| |
|
|
| |
llvm-svn: 123263
|
| |
|
|
|
|
| |
conveniently distinguish between loads/stores.
llvm-svn: 123261
|
| |
|
|
| |
llvm-svn: 123240
|
| |
|
|
|
|
|
|
| |
to use a node builder. This paves the way
for Checkers to interpose (via a "visit" method)
at the entrance to blocks.
llvm-svn: 123217
|
| |
|
|
|
|
| |
with lowercase letter.
llvm-svn: 123212
|
| |
|
|
|
|
| |
with a lower-case letter. No functionality change.
llvm-svn: 123211
|
| |
|
|
| |
llvm-svn: 123167
|