| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
Checkers.inc to be
included without '..', thus being compatible with build systems of *BSDs.
Patch by Joerg Sonnenberger!
llvm-svn: 125758
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
class and to bind the shared value using OpaqueValueExpr. This fixes an
unnoticed problem with deserialization of these expressions where the
deserialized form would lose the vital pointer-equality trait; or rather,
it fixes it because this patch also does the right thing for deserializing
OVEs.
Change OVEs to not be a "temporary object" in the sense that copy elision is
permitted.
This new representation is not totally unawkward to work with, but I think
that's really part and parcel with the semantics we're modelling here. In
particular, it's much easier to fix things like the copy elision bug and to
make the CFG look right.
I've tried to update the analyzer to deal with this in at least some
obvious cases, and I think we get a much better CFG out, but the printing
of OpaqueValueExprs probably needs some work.
llvm-svn: 125744
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
LabelDecl and LabelStmt. There is a 1-1 correspondence between the
two, but this simplifies a bunch of code by itself. This is because
labels are the only place where we previously had references to random
other statements, causing grief for AST serialization and other stuff.
This does cause one regression (attr(unused) doesn't silence unused
label warnings) which I'll address next.
This does fix some minor bugs:
1. "The only valid attribute " diagnostic was capitalized.
2. Various diagnostics printed as ''labelname'' instead of 'labelname'
3. This reduces duplication of label checking between functions and blocks.
Review appreciated, particularly for the cindex and template bits.
llvm-svn: 125733
|
| |
|
|
| |
llvm-svn: 125724
|
| |
|
|
|
|
| |
by kremenek.
llvm-svn: 125687
|
| |
|
|
| |
llvm-svn: 125645
|
| |
|
|
| |
llvm-svn: 125642
|
| |
|
|
| |
llvm-svn: 125637
|
| |
|
|
|
|
|
|
|
|
| |
NilArgChecker
CFNumberCreateChecker
NSAutoreleasePoolChecker
CFRetainReleaseChecker
ClassReleaseChecker
llvm-svn: 125636
|
| |
|
|
|
|
|
|
|
|
|
| |
internal checkers:
CastToStructChecker
FixedAddressChecker
PointerArithChecker
PointerSubChecker
llvm-svn: 125612
|
| |
|
|
| |
llvm-svn: 125611
|
| |
|
|
| |
llvm-svn: 125599
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
checks. These are:
CStringChecker
ChrootChecker
MallocChecker
PthreadLockChecker
StreamChecker
UnreachableCodeChecker
MallocChecker creates implicit dependencies between checkers and needs to be handled differently.
llvm-svn: 125598
|
| |
|
|
| |
llvm-svn: 125566
|
| |
|
|
| |
llvm-svn: 125565
|
| |
|
|
|
|
|
| |
-Update tablegen files for checkers, use the tablegen class name for the checker class name.
-Update ClangSACheckersProvider to not look into hidden checker packages.
llvm-svn: 125560
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
checks. These are:
StackAddrLeakChecker
ObjCAtSyncChecker
UnixAPIChecker
MacOSXAPIChecker
The rest have/create implicit dependencies between checkers and need to be handled differently.
llvm-svn: 125559
|
| |
|
|
| |
llvm-svn: 125548
|
| |
|
|
|
|
| |
for all compiler invocations.
llvm-svn: 125514
|
| |
|
|
| |
llvm-svn: 125507
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
-Checkers will be defined in the tablegen file 'Checkers.td'.
-Apart from checkers, we can define checker "packages" that will contain a collection of checkers.
-Checkers can be enabled with -analyzer-checker=<name> and disabled with -analyzer-disable-checker=<name> e.g:
Enable checkers from 'cocoa' and 'corefoundation' packages except the self-initialization checker:
-analyzer-checker=cocoa -analyzer-checker=corefoundation -analyzer-disable-checker=cocoa.SelfInit
-Introduces CheckerManager and CheckerProvider. CheckerProviders get the set of checker names to enable/disable and
register them with the CheckerManager which will be the entry point for all checker-related functionality.
Currently only the self-initialization checker takes advantage of the new mechanism.
llvm-svn: 125503
|
| |
|
|
|
|
|
|
| |
load analyzer plugins dynamically but
registration through static constructors should be avoided.
llvm-svn: 125502
|
| |
|
|
|
|
|
|
| |
lib/StaticAnalyzer/Frontend/AnalysisConsumer.h since
FrontendActions.cpp is the only user.
llvm-svn: 125501
|
| |
|
|
| |
llvm-svn: 125500
|
| |
|
|
|
|
| |
Checkers/AnalysisConsumer.cpp into Frontend lib.
llvm-svn: 125499
|
| |
|
|
| |
llvm-svn: 125497
|
| |
|
|
|
|
| |
due to incomplete analysis of loops.
llvm-svn: 125495
|
| |
|
|
|
|
| |
IdempotentOperationsChecker. No real functionality change.
llvm-svn: 125494
|
| |
|
|
| |
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
|
| |
|
|
|
|
|
|
| |
message expression, just as we do with parameters.
Fixes <rdar://problem/8725041>.
llvm-svn: 125422
|
| |
|
|
|
|
|
|
| |
statement. We've never seen any other cases that were real bugs.
Fixes <rdar://problem/6962292>.
llvm-svn: 125419
|
| |
|
|
|
|
|
| |
I also sorted the tools/driver dependencies since their order no
longer matters.
llvm-svn: 125417
|
| |
|
|
|
|
| |
<rdar://problem/8405222>.
llvm-svn: 125415
|
| |
|
|
| |
llvm-svn: 125396
|
| |
|
|
| |
llvm-svn: 125395
|
| |
|
|
|
|
| |
instead of a reference.
llvm-svn: 125362
|
| |
|
|
| |
llvm-svn: 125275
|
| |
|
|
| |
llvm-svn: 125262
|
| |
|
|
|
|
|
|
| |
managed by ExplodedNodes.
This reduces memory usage of the analyzer on sqlite by another 5%.
llvm-svn: 125260
|
| |
|
|
|
|
|
|
| |
'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
|
| |
|
|
|
|
| |
message to 'self' are no longer tracked.
llvm-svn: 125130
|
| |
|
|
|
|
|
| |
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
|