fix some more gcc3.4 constness warnings

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106216 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp
index 84f6f40..07b0c26 100644
--- a/lib/Sema/SemaExprCXX.cpp
+++ b/lib/Sema/SemaExprCXX.cpp
@@ -2924,7 +2924,8 @@
   // record types and dependent types matter.
   void *ObjectTypePtrForLookup = 0;
   if (!SS.isSet()) {
-    ObjectTypePtrForLookup = (void *)ObjectType->getAs<RecordType>();
+    ObjectTypePtrForLookup = const_cast<RecordType*>(
+                                               ObjectType->getAs<RecordType>());
     if (!ObjectTypePtrForLookup && ObjectType->isDependentType())
       ObjectTypePtrForLookup = Context.DependentTy.getAsOpaquePtr();
   }