Introduce new CFGElement hierarchy to support C++ CFG, based on Marcin's patch
and discussions with Ted and Jordy.

llvm-svn: 114056
diff --git a/clang/lib/Checker/GRExprEngine.cpp b/clang/lib/Checker/GRExprEngine.cpp
index bead4e1..e01c645 100644
--- a/clang/lib/Checker/GRExprEngine.cpp
+++ b/clang/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);