llvm-project/clang/lib/StaticAnalyzer/Checkers
John McCall bd06678921 Remove vtables from the Stmt hierarchy; this was pretty easy as
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
2011-02-09 08:16:59 +00:00
..
AdjustedReturnValueChecker.cpp [analyzer] lib/StaticAnalyzer/Checkers/ExprEngineInternalChecks.h -> lib/StaticAnalyzer/Checkers/InternalChecks.h 2011-02-08 22:30:02 +00:00
AnalysisConsumer.cpp static analyzer: Further reduce the analyzer's memory usage when analyzing sqlite3 by 7-10% by recylcing "uninteresting" ExplodedNodes. 2011-02-09 01:27:33 +00:00
AnalyzerStatsChecker.cpp [analyzer] Move the files in lib/StaticAnalyzer to lib/StaticAnalyzer/Core. 2011-02-08 22:30:36 +00:00
ArrayBoundChecker.cpp [analyzer] lib/StaticAnalyzer/Checkers/ExprEngineInternalChecks.h -> lib/StaticAnalyzer/Checkers/InternalChecks.h 2011-02-08 22:30:02 +00:00
ArrayBoundCheckerV2.cpp [analyzer] lib/StaticAnalyzer/Checkers/ExprEngineInternalChecks.h -> lib/StaticAnalyzer/Checkers/InternalChecks.h 2011-02-08 22:30:02 +00:00
AttrNonNullChecker.cpp [analyzer] lib/StaticAnalyzer/Checkers/ExprEngineInternalChecks.h -> lib/StaticAnalyzer/Checkers/InternalChecks.h 2011-02-08 22:30:02 +00:00
BasicObjCFoundationChecks.cpp [analyzer] Introduce ObjCMessage which represents both explicit ObjC message expressions and implicit 2011-01-25 00:03:53 +00:00
BasicObjCFoundationChecks.h Chris Lattner has strong opinions about directory 2010-12-23 19:38:26 +00:00
BuiltinFunctionChecker.cpp [analyzer] lib/StaticAnalyzer/Checkers/ExprEngineInternalChecks.h -> lib/StaticAnalyzer/Checkers/InternalChecks.h 2011-02-08 22:30:02 +00:00
CMakeLists.txt [analyzer] Move the files in lib/StaticAnalyzer to lib/StaticAnalyzer/Core. 2011-02-08 22:30:36 +00:00
CStringChecker.cpp [analyzer] lib/StaticAnalyzer/Checkers/ExprEngineExperimentalChecks.h -> lib/StaticAnalyzer/Checkers/ExperimentalChecks.h 2011-02-08 22:30:11 +00:00
CallAndMessageChecker.cpp [analyzer] lib/StaticAnalyzer/Checkers/ExprEngineInternalChecks.h -> lib/StaticAnalyzer/Checkers/InternalChecks.h 2011-02-08 22:30:02 +00:00
CastSizeChecker.cpp [analyzer] lib/StaticAnalyzer/Checkers/ExprEngineInternalChecks.h -> lib/StaticAnalyzer/Checkers/InternalChecks.h 2011-02-08 22:30:02 +00:00
CastToStructChecker.cpp [analyzer] lib/StaticAnalyzer/Checkers/ExprEngineInternalChecks.h -> lib/StaticAnalyzer/Checkers/InternalChecks.h 2011-02-08 22:30:02 +00:00
CheckObjCDealloc.cpp Chris Lattner has strong opinions about directory 2010-12-23 19:38:26 +00:00
CheckObjCInstMethSignature.cpp Chris Lattner has strong opinions about directory 2010-12-23 19:38:26 +00:00
CheckSecuritySyntaxOnly.cpp NetBSD, OpenBSD, and Dragonfly BSD also have arc4random. Patch from 2011-01-17 19:16:24 +00:00
CheckSizeofPointer.cpp Chris Lattner has strong opinions about directory 2010-12-23 19:38:26 +00:00
ChrootChecker.cpp [analyzer] lib/StaticAnalyzer/Checkers/ExprEngineExperimentalChecks.h -> lib/StaticAnalyzer/Checkers/ExperimentalChecks.h 2011-02-08 22:30:11 +00:00
DeadStoresChecker.cpp Rename 'CheckDeadStores.cpp' to 'DeadStoresChecker.cpp'. 2011-01-13 20:58:59 +00:00
DereferenceChecker.cpp [analyzer] lib/StaticAnalyzer/Checkers/ExprEngineInternalChecks.h -> lib/StaticAnalyzer/Checkers/InternalChecks.h 2011-02-08 22:30:02 +00:00
DivZeroChecker.cpp [analyzer] lib/StaticAnalyzer/Checkers/ExprEngineInternalChecks.h -> lib/StaticAnalyzer/Checkers/InternalChecks.h 2011-02-08 22:30:02 +00:00
ExperimentalChecks.cpp [analyzer] lib/StaticAnalyzer/Checkers/ExprEngineExperimentalChecks.cpp -> lib/StaticAnalyzer/Checkers/ExperimentalChecks.cpp 2011-02-08 22:30:15 +00:00
ExperimentalChecks.h [analyzer] lib/StaticAnalyzer/Checkers/ExprEngineExperimentalChecks.h -> lib/StaticAnalyzer/Checkers/ExperimentalChecks.h 2011-02-08 22:30:11 +00:00
ExprEngine.cpp Remove vtables from the Stmt hierarchy; this was pretty easy as 2011-02-09 08:16:59 +00:00
FixedAddressChecker.cpp [analyzer] lib/StaticAnalyzer/Checkers/ExprEngineInternalChecks.h -> lib/StaticAnalyzer/Checkers/InternalChecks.h 2011-02-08 22:30:02 +00:00
FrontendActions.cpp Chris Lattner has strong opinions about directory 2010-12-23 19:38:26 +00:00
IdempotentOperationChecker.cpp [analyzer] lib/StaticAnalyzer/Checkers/ExprEngineExperimentalChecks.h -> lib/StaticAnalyzer/Checkers/ExperimentalChecks.h 2011-02-08 22:30:11 +00:00
InternalChecks.h [analyzer] lib/StaticAnalyzer/Checkers/ExprEngineInternalChecks.h -> lib/StaticAnalyzer/Checkers/InternalChecks.h 2011-02-08 22:30:02 +00:00
LLVMConventionsChecker.cpp Cleanup confused code that redundantly called "getDeclContext()" twice. 2011-01-14 22:31:41 +00:00
MacOSXAPIChecker.cpp [analyzer] lib/StaticAnalyzer/Checkers/ExprEngineInternalChecks.h -> lib/StaticAnalyzer/Checkers/InternalChecks.h 2011-02-08 22:30:02 +00:00
Makefile Chris Lattner has strong opinions about directory 2010-12-23 19:38:26 +00:00
MallocChecker.cpp [analyzer] lib/StaticAnalyzer/Checkers/ExprEngineExperimentalChecks.h -> lib/StaticAnalyzer/Checkers/ExperimentalChecks.h 2011-02-08 22:30:11 +00:00
NSAutoreleasePoolChecker.cpp [analyzer] Introduce ObjCMessage which represents both explicit ObjC message expressions and implicit 2011-01-25 00:03:53 +00:00
NSErrorChecker.cpp Chris Lattner has strong opinions about directory 2010-12-23 19:38:26 +00:00
NoReturnFunctionChecker.cpp [analyzer] lib/StaticAnalyzer/Checkers/ExprEngineInternalChecks.h -> lib/StaticAnalyzer/Checkers/InternalChecks.h 2011-02-08 22:30:02 +00:00
OSAtomicChecker.cpp [analyzer] lib/StaticAnalyzer/Checkers/ExprEngineInternalChecks.h -> lib/StaticAnalyzer/Checkers/InternalChecks.h 2011-02-08 22:30:02 +00:00
ObjCAtSyncChecker.cpp [analyzer] lib/StaticAnalyzer/Checkers/ExprEngineInternalChecks.h -> lib/StaticAnalyzer/Checkers/InternalChecks.h 2011-02-08 22:30:02 +00:00
ObjCSelfInitChecker.cpp [analyzer] lib/StaticAnalyzer/Checkers/ExprEngineInternalChecks.h -> lib/StaticAnalyzer/Checkers/InternalChecks.h 2011-02-08 22:30:02 +00:00
ObjCUnusedIVarsChecker.cpp Chris Lattner has strong opinions about directory 2010-12-23 19:38:26 +00:00
PointerArithChecker.cpp [analyzer] lib/StaticAnalyzer/Checkers/ExprEngineInternalChecks.h -> lib/StaticAnalyzer/Checkers/InternalChecks.h 2011-02-08 22:30:02 +00:00
PointerSubChecker.cpp [analyzer] lib/StaticAnalyzer/Checkers/ExprEngineInternalChecks.h -> lib/StaticAnalyzer/Checkers/InternalChecks.h 2011-02-08 22:30:02 +00:00
PthreadLockChecker.cpp [analyzer] lib/StaticAnalyzer/Checkers/ExprEngineExperimentalChecks.h -> lib/StaticAnalyzer/Checkers/ExperimentalChecks.h 2011-02-08 22:30:11 +00:00
ReturnPointerRangeChecker.cpp [analyzer] lib/StaticAnalyzer/Checkers/ExprEngineInternalChecks.h -> lib/StaticAnalyzer/Checkers/InternalChecks.h 2011-02-08 22:30:02 +00:00
ReturnUndefChecker.cpp [analyzer] lib/StaticAnalyzer/Checkers/ExprEngineInternalChecks.h -> lib/StaticAnalyzer/Checkers/InternalChecks.h 2011-02-08 22:30:02 +00:00
StackAddrLeakChecker.cpp [analyzer] lib/StaticAnalyzer/Checkers/ExprEngineInternalChecks.h -> lib/StaticAnalyzer/Checkers/InternalChecks.h 2011-02-08 22:30:02 +00:00
StreamChecker.cpp [analyzer] lib/StaticAnalyzer/Checkers/ExprEngineExperimentalChecks.h -> lib/StaticAnalyzer/Checkers/ExperimentalChecks.h 2011-02-08 22:30:11 +00:00
UndefBranchChecker.cpp [analyzer] lib/StaticAnalyzer/Checkers/ExprEngineInternalChecks.h -> lib/StaticAnalyzer/Checkers/InternalChecks.h 2011-02-08 22:30:02 +00:00
UndefCapturedBlockVarChecker.cpp [analyzer] lib/StaticAnalyzer/Checkers/ExprEngineInternalChecks.h -> lib/StaticAnalyzer/Checkers/InternalChecks.h 2011-02-08 22:30:02 +00:00
UndefResultChecker.cpp [analyzer] lib/StaticAnalyzer/Checkers/ExprEngineInternalChecks.h -> lib/StaticAnalyzer/Checkers/InternalChecks.h 2011-02-08 22:30:02 +00:00
UndefinedArraySubscriptChecker.cpp [analyzer] lib/StaticAnalyzer/Checkers/ExprEngineInternalChecks.h -> lib/StaticAnalyzer/Checkers/InternalChecks.h 2011-02-08 22:30:02 +00:00
UndefinedAssignmentChecker.cpp [analyzer] lib/StaticAnalyzer/Checkers/ExprEngineInternalChecks.h -> lib/StaticAnalyzer/Checkers/InternalChecks.h 2011-02-08 22:30:02 +00:00
UnixAPIChecker.cpp [analyzer] lib/StaticAnalyzer/Checkers/ExprEngineInternalChecks.h -> lib/StaticAnalyzer/Checkers/InternalChecks.h 2011-02-08 22:30:02 +00:00
UnreachableCodeChecker.cpp [analyzer] lib/StaticAnalyzer/Checkers/ExprEngineExperimentalChecks.h -> lib/StaticAnalyzer/Checkers/ExperimentalChecks.h 2011-02-08 22:30:11 +00:00
VLASizeChecker.cpp [analyzer] lib/StaticAnalyzer/Checkers/ExprEngineInternalChecks.h -> lib/StaticAnalyzer/Checkers/InternalChecks.h 2011-02-08 22:30:02 +00:00