}
Decl *cxcursor::getCursorDecl(CXCursor Cursor) {
- return (Decl *)Cursor.data[0];
+ return static_cast<Decl*>(const_cast<void*>(Cursor.data[0]));
}
Expr *cxcursor::getCursorExpr(CXCursor Cursor) {
Cursor.kind == CXCursor_ObjCClassRef)
return 0;
- return (Stmt *)Cursor.data[1];
+ return static_cast<Stmt*>(const_cast<void*>(Cursor.data[1]));
}
Attr *cxcursor::getCursorAttr(CXCursor Cursor) {
- return (Attr *)Cursor.data[1];
+ return static_cast<Attr*>(const_cast<void*>(Cursor.data[1]));
}
Decl *cxcursor::getCursorParentDecl(CXCursor Cursor) {
- return (Decl *)Cursor.data[0];
+ return static_cast<Decl*>(const_cast<void*>(Cursor.data[0]));
}
ASTContext &cxcursor::getCursorContext(CXCursor Cursor) {
return createNullLocation(file, line, column, offset);
if (file)
- *file = (void *)SM.getFileEntryForID(FID);
+ *file = static_cast<void*>(const_cast<FileEntry*>(SM.getFileEntryForID(FID)));
if (line)
*line = SM.getLineNumber(FID, FileOffset);
if (column)