Replace CFGElement llvm::cast support to be well-defined.

See r175462 for another example/more details.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175796 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/ReachableCode.cpp b/lib/Analysis/ReachableCode.cpp
index 7bf01bb..f85e2de 100644
--- a/lib/Analysis/ReachableCode.cpp
+++ b/lib/Analysis/ReachableCode.cpp
@@ -95,8 +95,8 @@
 
 const Stmt *DeadCodeScan::findDeadCode(const clang::CFGBlock *Block) {
   for (CFGBlock::const_iterator I = Block->begin(), E = Block->end(); I!=E; ++I)
-    if (const CFGStmt *CS = I->getAs<CFGStmt>()) {
-      const Stmt *S = CS->getStmt();
+    if (CFGStmt CS = I->getAs<CFGStmt>()) {
+      const Stmt *S = CS.getStmt();
       if (isValidDeadStmt(S))
         return S;
     }