From 3315618561d19c99a7a52c72a31fb182111da716 Mon Sep 17 00:00:00 2001 From: Dmitri Gribenko Date: Fri, 11 Jan 2013 21:06:06 +0000 Subject: [PATCH] libclang: remove unneeded casts git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172253 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/libclang/CXCursor.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tools/libclang/CXCursor.cpp b/tools/libclang/CXCursor.cpp index 9be4fa202c..75e670e765 100644 --- a/tools/libclang/CXCursor.cpp +++ b/tools/libclang/CXCursor.cpp @@ -56,7 +56,7 @@ static CXCursorKind GetCursorKind(const Attr *A) { CXCursor cxcursor::MakeCXCursor(const Attr *A, Decl *Parent, CXTranslationUnit TU) { assert(A && Parent && TU && "Invalid arguments!"); - CXCursor C = { GetCursorKind(A), 0, { Parent, (void*)A, TU } }; + CXCursor C = { GetCursorKind(A), 0, { Parent, A, TU } }; return C; } @@ -512,7 +512,7 @@ CXCursor cxcursor::MakeCursorObjCProtocolRef(const ObjCProtocolDecl *Proto, CXTranslationUnit TU) { assert(Proto && TU && "Invalid arguments!"); void *RawLoc = reinterpret_cast(Loc.getRawEncoding()); - CXCursor C = { CXCursor_ObjCProtocolRef, 0, { (void*)Proto, RawLoc, TU } }; + CXCursor C = { CXCursor_ObjCProtocolRef, 0, { Proto, RawLoc, TU } }; return C; } @@ -532,7 +532,7 @@ CXCursor cxcursor::MakeCursorObjCClassRef(const ObjCInterfaceDecl *Class, return MakeCXCursorInvalid(CXCursor_InvalidCode); assert(TU && "Invalid arguments!"); void *RawLoc = reinterpret_cast(Loc.getRawEncoding()); - CXCursor C = { CXCursor_ObjCClassRef, 0, { (void*)Class, RawLoc, TU } }; + CXCursor C = { CXCursor_ObjCClassRef, 0, { Class, RawLoc, TU } }; return C; } @@ -548,7 +548,7 @@ CXCursor cxcursor::MakeCursorTypeRef(const TypeDecl *Type, SourceLocation Loc, CXTranslationUnit TU) { assert(Type && TU && "Invalid arguments!"); void *RawLoc = reinterpret_cast(Loc.getRawEncoding()); - CXCursor C = { CXCursor_TypeRef, 0, { (void*)Type, RawLoc, TU } }; + CXCursor C = { CXCursor_TypeRef, 0, { Type, RawLoc, TU } }; return C; } @@ -565,7 +565,7 @@ CXCursor cxcursor::MakeCursorTemplateRef(const TemplateDecl *Template, CXTranslationUnit TU) { assert(Template && TU && "Invalid arguments!"); void *RawLoc = reinterpret_cast(Loc.getRawEncoding()); - CXCursor C = { CXCursor_TemplateRef, 0, { (void*)Template, RawLoc, TU } }; + CXCursor C = { CXCursor_TemplateRef, 0, { Template, RawLoc, TU } }; return C; } @@ -584,7 +584,7 @@ CXCursor cxcursor::MakeCursorNamespaceRef(const NamedDecl *NS, assert(NS && (isa(NS) || isa(NS)) && TU && "Invalid arguments!"); void *RawLoc = reinterpret_cast(Loc.getRawEncoding()); - CXCursor C = { CXCursor_NamespaceRef, 0, { (void*)NS, RawLoc, TU } }; + CXCursor C = { CXCursor_NamespaceRef, 0, { NS, RawLoc, TU } }; return C; } @@ -601,7 +601,7 @@ CXCursor cxcursor::MakeCursorVariableRef(const VarDecl *Var, SourceLocation Loc, assert(Var && TU && "Invalid arguments!"); void *RawLoc = reinterpret_cast(Loc.getRawEncoding()); - CXCursor C = { CXCursor_VariableRef, 0, { (void*)Var, RawLoc, TU } }; + CXCursor C = { CXCursor_VariableRef, 0, { Var, RawLoc, TU } }; return C; } @@ -618,7 +618,7 @@ CXCursor cxcursor::MakeCursorMemberRef(const FieldDecl *Field, SourceLocation Lo assert(Field && TU && "Invalid arguments!"); void *RawLoc = reinterpret_cast(Loc.getRawEncoding()); - CXCursor C = { CXCursor_MemberRef, 0, { (void*)Field, RawLoc, TU } }; + CXCursor C = { CXCursor_MemberRef, 0, { Field, RawLoc, TU } }; return C; } @@ -632,7 +632,7 @@ cxcursor::getCursorMemberRef(CXCursor C) { CXCursor cxcursor::MakeCursorCXXBaseSpecifier(const CXXBaseSpecifier *B, CXTranslationUnit TU){ - CXCursor C = { CXCursor_CXXBaseSpecifier, 0, { (void*)B, 0, TU } }; + CXCursor C = { CXCursor_CXXBaseSpecifier, 0, { B, 0, TU } }; return C; } -- 2.40.0