Introduce new CFGElement hierarchy to support C++ CFG, based on Marcin's patch
and discussions with Ted and Jordy.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114056 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Checker/GRExprEngine.cpp b/lib/Checker/GRExprEngine.cpp
index bead4e1..e01c645 100644
--- a/lib/Checker/GRExprEngine.cpp
+++ b/lib/Checker/GRExprEngine.cpp
@@ -634,7 +634,7 @@
}
void GRExprEngine::ProcessStmt(const CFGElement CE,GRStmtNodeBuilder& builder) {
- CurrentStmt = CE.getStmt();
+ CurrentStmt = CE.getAs<CFGStmt>();
PrettyStackTraceLoc CrashInfo(getContext().getSourceManager(),
CurrentStmt->getLocStart(),
"Error evaluating statement");
@@ -721,7 +721,7 @@
Builder->SetCleanedState(*I == EntryNode ? CleanedState : GetState(*I));
// Visit the statement.
- if (CE.asLValue())
+ if (CE.getAs<CFGStmt>().asLValue())
VisitLValue(cast<Expr>(CurrentStmt), *I, Dst);
else
Visit(CurrentStmt, *I, Dst);