[analyzer] Remove cast inside dyn_cast.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162951 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp b/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
index cfb35a4..cddb5f0 100644
--- a/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
+++ b/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
@@ -737,7 +737,7 @@
                                     CheckerContext &C) {
   SVal Val = State->getSVal(NonNullExpr, C.getLocationContext());
   if (DefinedOrUnknownSVal *DV = dyn_cast<DefinedOrUnknownSVal>(&Val))
-    return State->assume(cast<DefinedOrUnknownSVal>(*DV), true);
+    return State->assume(*DV, true);
   return State;
 }