Fix some const_cast issues.  This is the beginning of the rabbit hole.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78393 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/DeclCXX.cpp b/lib/AST/DeclCXX.cpp
index 52619e9..e07eae7 100644
--- a/lib/AST/DeclCXX.cpp
+++ b/lib/AST/DeclCXX.cpp
@@ -379,9 +379,7 @@
   if (ClassTemplateDecl *TD = getParent()->getDescribedClassTemplate())
     ClassTy = TD->getInjectedClassNameType(C);
   else
-    // FIXME: What is the design on getTagDeclType when it requires casting
-    // away const?  mutable?
-    ClassTy = C.getTagDeclType(const_cast<CXXRecordDecl*>(getParent()));
+    ClassTy = C.getTagDeclType(getParent());
   ClassTy = ClassTy.getWithAdditionalQualifiers(getTypeQualifiers());
   return C.getPointerType(ClassTy);
 }
@@ -466,10 +464,9 @@
     return false;
 
   // Is it a reference to our class type?
-  QualType PointeeType 
+  QualType PointeeType
     = Context.getCanonicalType(ParamRefType->getPointeeType());
-  QualType ClassTy 
-    = Context.getTagDeclType(const_cast<CXXRecordDecl*>(getParent()));
+  QualType ClassTy = Context.getTagDeclType(getParent());
   if (PointeeType.getUnqualifiedType() != ClassTy)
     return false;