From: Daniel Dunbar Date: Mon, 18 Jan 2010 17:52:42 +0000 (+0000) Subject: Fix -Asserts warning. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c81d718f60ccafb95efbc5985aecf42b3ff87c10;p=clang 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 36919f7011..c5c7409ffc 100644 --- a/tools/CIndex/CIndex.cpp +++ b/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: {