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

lib/Edit/RewriteObjCFoundationAPI.cpp

index 215aacdad10833a9f42843b68de527877efec0e9..e04168fc40ed99d3fbbd9cceb7681e7f67c25422 100644 (file)
@@ -296,9 +296,8 @@ bool edit::rewriteToObjCSubscriptSyntax(const ObjCMessageExpr *Msg,
   if (!Method)
     return false;
 
-  const ObjCInterfaceDecl *
-    IFace = NS.getASTContext().getObjContainingInterface(
-                                          const_cast<ObjCMethodDecl *>(Method));
+  const ObjCInterfaceDecl *IFace =
+      NS.getASTContext().getObjContainingInterface(Method);
   if (!IFace)
     return false;
   Selector Sel = Msg->getSelector();