]> granicus.if.org Git - clang/commitdiff
Change a dyn_cast from r199794 to a straight cast
authorAlp Toker <alp@nuanti.com>
Wed, 22 Jan 2014 07:53:08 +0000 (07:53 +0000)
committerAlp Toker <alp@nuanti.com>
Wed, 22 Jan 2014 07:53:08 +0000 (07:53 +0000)
It's guaranteed to be a CXXMethodDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199795 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaAccess.cpp

index c00ad81b097124e1dc12f70130faf2410b2ef95a..7b0eaaac39f076431a16dac900c66c73315bfd64 100644 (file)
@@ -1757,7 +1757,7 @@ Sema::AccessResult Sema::CheckFriendAccess(NamedDecl *target) {
   if (!getLangOpts().AccessControl || access == AS_public)
     return AR_accessible;
 
-  CXXMethodDecl *method = dyn_cast<CXXMethodDecl>(target->getAsFunction());
+  CXXMethodDecl *method = cast<CXXMethodDecl>(target->getAsFunction());
   assert(method->getQualifier());
 
   AccessTarget entity(Context, AccessTarget::Member,