Fix -Asserts warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93731 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/CIndex/CIndex.cpp b/tools/CIndex/CIndex.cpp
index 36919f7..c5c7409 100644
--- a/tools/CIndex/CIndex.cpp
+++ b/tools/CIndex/CIndex.cpp
@@ -754,8 +754,7 @@
 
 extern "C" {
 CXString clang_getCursorSpelling(CXCursor C) {
-  NamedDecl *ND = static_cast<NamedDecl *>(getCursorDecl(C));
-  assert(ND && "CXCursor has null decl");
+  assert(getCursorDecl(C) && "CXCursor has null decl");
   if (clang_isReference(C.kind)) {
     switch (C.kind) {
     case CXCursor_ObjCSuperClassRef: {