]> granicus.if.org Git - clang/commitdiff
Remove an unneeded const_cast
authorDmitri Gribenko <gribozavr@gmail.com>
Mon, 14 Jan 2013 00:25:25 +0000 (00:25 +0000)
committerDmitri Gribenko <gribozavr@gmail.com>
Mon, 14 Jan 2013 00:25:25 +0000 (00:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172370 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/InheritViz.cpp

index b70520f44dc5ca5cb4d15f30063727a634c69b46..e03632a71e0eac59e6bf9e1a6b0281ee9b77c0a7 100644 (file)
@@ -134,7 +134,7 @@ InheritanceHierarchyWriter::WriteNodeReference(QualType Type,
 /// viewInheritance - Display the inheritance hierarchy of this C++
 /// class using GraphViz.
 void CXXRecordDecl::viewInheritance(ASTContext& Context) const {
-  QualType Self = Context.getTypeDeclType(const_cast<CXXRecordDecl *>(this));
+  QualType Self = Context.getTypeDeclType(this);
   std::string ErrMsg;
   sys::Path Filename = sys::Path::GetTemporaryDirectory(&ErrMsg);
   if (Filename.isEmpty()) {