- Feb 17, 2011
-
-
Argyrios Kyrtzidis authored
DeadStoresChecker ObjCMethSigsChecker ObjCUnusedIvarsChecker SizeofPointerChecker ObjCDeallocChecker SecuritySyntaxChecker llvm-svn: 125779
-
Argyrios Kyrtzidis authored
-Introduce CheckerV2, a set of templates for convenient declaration & registration of checkers. Currently useful just for checkers working on the AST not the path-sensitive ones. -Enhance CheckerManager to actually collect the checkers and turn it into the entry point for running the checkers. -Use the new mechanism for the LLVMConventionsChecker. llvm-svn: 125778
-
Argyrios Kyrtzidis authored
llvm-svn: 125777
-
Argyrios Kyrtzidis authored
included without '..', thus being compatible with build systems of *BSDs. Patch by Joerg Sonnenberger! llvm-svn: 125758
-
John McCall authored
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
-
Chris Lattner authored
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
-
Chris Lattner authored
llvm-svn: 125724
-
- Feb 16, 2011
-
-
Zhanyong Wan authored
by kremenek. llvm-svn: 125687
-
Nick Lewycky authored
llvm-svn: 125645
-
Nick Lewycky authored
llvm-svn: 125642
-
Argyrios Kyrtzidis authored
NilArgChecker CFNumberCreateChecker NSAutoreleasePoolChecker CFRetainReleaseChecker ClassReleaseChecker llvm-svn: 125636
-
- Feb 15, 2011
-
-
Argyrios Kyrtzidis authored
CastToStructChecker FixedAddressChecker PointerArithChecker PointerSubChecker llvm-svn: 125612
-
Argyrios Kyrtzidis authored
llvm-svn: 125611
-
Argyrios Kyrtzidis authored
CStringChecker ChrootChecker MallocChecker PthreadLockChecker StreamChecker UnreachableCodeChecker MallocChecker creates implicit dependencies between checkers and needs to be handled differently. llvm-svn: 125598
-
Douglas Gregor authored
llvm-svn: 125566
-
Argyrios Kyrtzidis authored
-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
-
Argyrios Kyrtzidis authored
StackAddrLeakChecker ObjCAtSyncChecker UnixAPIChecker MacOSXAPIChecker The rest have/create implicit dependencies between checkers and need to be handled differently. llvm-svn: 125559
-
Ted Kremenek authored
llvm-svn: 125548
-
- Feb 14, 2011
-
-
Oscar Fuentes authored
for all compiler invocations. llvm-svn: 125514
-
Argyrios Kyrtzidis authored
llvm-svn: 125507
-
Argyrios Kyrtzidis authored
-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
-
Argyrios Kyrtzidis authored
llvm-svn: 125500
-
Argyrios Kyrtzidis authored
[analyzer] Introduce libclangStaticAnalyzerFrontend and move Checkers/AnalysisConsumer.cpp into Frontend lib. llvm-svn: 125499
-
Ted Kremenek authored
llvm-svn: 125497
-
Ted Kremenek authored
Fix edge case where we don't cull warnings in IdempotentOperationsChecker due to incomplete analysis of loops. llvm-svn: 125495
-
Ted Kremenek authored
Use 'BitVector' instead of SmallPtrSet<CFGBlock*> in IdempotentOperationsChecker. No real functionality change. llvm-svn: 125494
-
- Feb 12, 2011
-
-
Ted Kremenek authored
llvm-svn: 125443
-
Ted Kremenek authored
Weaken the ObjCSelfInitChecker to only warn when one calls an 'init' method 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
-
Ted Kremenek authored
Don't emit a dead store for '++' operations unless it occurs with a return statement. We've never seen any other cases that were real bugs. Fixes <rdar://problem/6962292>. llvm-svn: 125419
-
-
- Feb 11, 2011
-
-
Ted Kremenek authored
llvm-svn: 125395
-
- Feb 10, 2011
-
-
NAKAMURA Takumi authored
llvm-svn: 125275
-
Ted Kremenek authored
Split 'include/clang/StaticAnalyzer' into 'include/clang/StaticAnalyzer/Core' and 'include/clang/StaticAnalyzer/Checkers'. This layout matches lib/StaticAnalyzer, which corresponds to two StaticAnalyzer libraries. llvm-svn: 125251
-
- Feb 09, 2011
-
-
Peter Collingbourne authored
llvm-svn: 125217
-
John McCall authored
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
-
Ted Kremenek authored
static analyzer: Further reduce the analyzer's memory usage when analyzing 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
-
- Feb 08, 2011
-
-
Argyrios Kyrtzidis authored
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
-
Argyrios Kyrtzidis authored
[analyzer] lib/StaticAnalyzer/Checkers/ExprEngineExperimentalChecks.cpp -> lib/StaticAnalyzer/Checkers/ExperimentalChecks.cpp llvm-svn: 125123
-
Argyrios Kyrtzidis authored
[analyzer] lib/StaticAnalyzer/Checkers/ExprEngineExperimentalChecks.h -> lib/StaticAnalyzer/Checkers/ExperimentalChecks.h llvm-svn: 125122
-
Argyrios Kyrtzidis authored
[analyzer] lib/StaticAnalyzer/Checkers/ExprEngineInternalChecks.h -> lib/StaticAnalyzer/Checkers/InternalChecks.h llvm-svn: 125121
-