diff --git a/clang/tools/CIndex/CIndex.cpp b/clang/tools/CIndex/CIndex.cpp index 36919f701127489d67b01e16999428ef9a7109ae..c5c7409ffcfb10751509a1386627fc80539d753b 100644 --- a/clang/tools/CIndex/CIndex.cpp +++ b/clang/tools/CIndex/CIndex.cpp @@ -754,8 +754,7 @@ static Decl *getDeclFromExpr(Stmt *E) { extern "C" { CXString clang_getCursorSpelling(CXCursor C) { - NamedDecl *ND = static_cast(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: {