Skip to content
Snippets Groups Projects
Commit 33156185 authored by Dmitri Gribenko's avatar Dmitri Gribenko
Browse files

libclang: remove unneeded casts

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172253 91177308-0d34-0410-b5e6-96231b3b80d8
parent 67812b2f
No related branches found
No related tags found
No related merge requests found
......@@ -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<void *>(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<void *>(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<void *>(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<void *>(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<NamespaceDecl>(NS) || isa<NamespaceAliasDecl>(NS)) && TU &&
"Invalid arguments!");
void *RawLoc = reinterpret_cast<void *>(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<void *>(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<void *>(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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment