diff options
| author | John McCall <rjmccall@apple.com> | 2011-02-09 08:16:59 +0000 |
|---|---|---|
| committer | John McCall <rjmccall@apple.com> | 2011-02-09 08:16:59 +0000 |
| commit | bd06678921615ad90caed466e011bd928261b22b (patch) | |
| tree | 08525bb226d9a49b8c442b8f0460f3ad64a70544 /clang/lib/StaticAnalyzer | |
| parent | 392d2ed8a13ab6af8f0108299f9323d89457771c (diff) | |
| download | bcm5719-llvm-bd06678921615ad90caed466e011bd928261b22b.tar.gz bcm5719-llvm-bd06678921615ad90caed466e011bd928261b22b.zip | |
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
Diffstat (limited to 'clang/lib/StaticAnalyzer')
| -rw-r--r-- | clang/lib/StaticAnalyzer/Checkers/ExprEngine.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/ExprEngine.cpp b/clang/lib/StaticAnalyzer/Checkers/ExprEngine.cpp index e2ad17e590b..e01d171d190 100644 --- a/clang/lib/StaticAnalyzer/Checkers/ExprEngine.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/ExprEngine.cpp @@ -860,7 +860,6 @@ void ExprEngine::Visit(const Stmt* S, ExplodedNode* Pred, case Stmt::LabelStmtClass: case Stmt::NoStmtClass: case Stmt::NullStmtClass: - case Stmt::SwitchCaseClass: case Stmt::OpaqueValueExprClass: llvm_unreachable("Stmt should not be in analyzer evaluation loop"); break; |

