diff options
Diffstat (limited to 'lib/Checker/GRExprEngine.cpp')
-rw-r--r-- | lib/Checker/GRExprEngine.cpp | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/lib/Checker/GRExprEngine.cpp b/lib/Checker/GRExprEngine.cpp index 4a1df68e5b..d57bbc2dc1 100644 --- a/lib/Checker/GRExprEngine.cpp +++ b/lib/Checker/GRExprEngine.cpp @@ -552,8 +552,27 @@ void GRExprEngine::ProcessEndWorklist(bool hasWorkRemaining) { } } -void GRExprEngine::ProcessStmt(const CFGElement CE,GRStmtNodeBuilder& builder) { - CurrentStmt = CE.getAs<CFGStmt>(); +void GRExprEngine::ProcessElement(const CFGElement E, + GRStmtNodeBuilder& builder) { + switch (E.getKind()) { + case CFGElement::Statement: + case CFGElement::StatementAsLValue: + ProcessStmt(E.getAs<CFGStmt>(), builder); + break; + case CFGElement::Initializer: + ProcessInitializer(E.getAs<CFGInitializer>(), builder); + break; + case CFGElement::ImplicitDtor: + ProcessImplicitDtor(E.getAs<CFGImplicitDtor>(), builder); + break; + default: + // Suppress compiler warning. + llvm_unreachable("Unexpected CFGElement kind."); + } +} + +void GRExprEngine::ProcessStmt(const CFGStmt S, GRStmtNodeBuilder& builder) { + CurrentStmt = S.getStmt(); PrettyStackTraceLoc CrashInfo(getContext().getSourceManager(), CurrentStmt->getLocStart(), "Error evaluating statement"); @@ -636,7 +655,7 @@ void GRExprEngine::ProcessStmt(const CFGElement CE,GRStmtNodeBuilder& builder) { Builder->SetCleanedState(*I == EntryNode ? CleanedState : GetState(*I)); // Visit the statement. - if (CE.getAs<CFGStmt>().asLValue()) + if (S.asLValue()) VisitLValue(cast<Expr>(CurrentStmt), *I, Dst); else Visit(CurrentStmt, *I, Dst); @@ -660,6 +679,14 @@ void GRExprEngine::ProcessStmt(const CFGElement CE,GRStmtNodeBuilder& builder) { Builder = NULL; } +void GRExprEngine::ProcessInitializer(const CFGInitializer I, + GRStmtNodeBuilder &builder) { +} + +void GRExprEngine::ProcessImplicitDtor(const CFGImplicitDtor D, + GRStmtNodeBuilder &builder) { +} + void GRExprEngine::Visit(const Stmt* S, ExplodedNode* Pred, ExplodedNodeSet& Dst) { PrettyStackTraceLoc CrashInfo(getContext().getSourceManager(), |