]> granicus.if.org Git - clang/commitdiff
Remove some unnecessary casts
authorDavid Blaikie <dblaikie@gmail.com>
Thu, 17 Jan 2013 05:26:21 +0000 (05:26 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Thu, 17 Jan 2013 05:26:21 +0000 (05:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172700 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaDeclCXX.cpp

index fd6cd9c8c4cbbf9be497918cba4df35005efcce8..2e73a4e9cd64cab499a728fdde9b94a97a1820ba 100644 (file)
@@ -3220,9 +3220,9 @@ static void *GetKeyForTopLevelField(FieldDecl *Field) {
   // For anonymous unions, use the class declaration as the key.
   if (const RecordType *RT = Field->getType()->getAs<RecordType>()) {
     if (RT->getDecl()->isAnonymousStructOrUnion())
-      return static_cast<void *>(RT->getDecl());
+      return RT->getDecl();
   }
-  return static_cast<void *>(Field);
+  return Field;
 }
 
 static void *GetKeyForBase(ASTContext &Context, QualType BaseType) {
@@ -3250,10 +3250,10 @@ static void *GetKeyForMember(ASTContext &Context,
         break;
     }
       
-    return static_cast<void *>(RD);
+    return RD;
   }
 
-  return static_cast<void *>(Field);
+  return Field;
 }
 
 static void