This is always going to be true so the cast isn't necessary.
llvm-svn: 161744
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 379d158..00127ac 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -999,11 +999,9 @@
}
else if (FunctionTemplateDecl *FTD = dyn_cast<FunctionTemplateDecl>(D))
for (FunctionTemplateDecl::spec_iterator SI = FTD->spec_begin(),
- SE = FTD->spec_end(); SI != SE; ++SI) {
- FunctionDecl *FD = *SI;
- if (CXXMethodDecl *M = dyn_cast<CXXMethodDecl>(FD))
- EltTys.push_back(CreateCXXMemberFunction(M, Unit, RecordTy));
- }
+ SE = FTD->spec_end(); SI != SE; ++SI)
+ EltTys.push_back(CreateCXXMemberFunction(cast<CXXMethodDecl>(*SI), Unit,
+ RecordTy));
}
}