Remove an unnecessary overload from ASTLambda.h

As Richard pointed out to me, dyn_cast is very cheap - there is no real benefit from adding cluttery overloads to only avoid that cast.
No functionality change.

llvm-svn: 191646
This commit is contained in:
Faisal Vali 2013-09-29 20:15:45 +00:00
parent db29268b10
commit f9a9af3c3d
2 changed files with 1 additions and 7 deletions

View File

@ -45,12 +45,6 @@ inline bool isGenericLambdaCallOperatorSpecialization(CXXMethodDecl *MD) {
return false;
}
inline bool isGenericLambdaCallOperatorSpecialization(Decl *D) {
if (!D || !isa<CXXMethodDecl>(D)) return false;
return isGenericLambdaCallOperatorSpecialization(
cast<CXXMethodDecl>(D));
}
inline bool isLambdaConversionOperator(CXXConversionDecl *C) {
return C ? C->getParent()->isLambda() : false;
}

View File

@ -9349,7 +9349,7 @@ Decl *Sema::ActOnStartOfFunctionDef(Scope *FnBodyScope, Decl *D) {
// a LambdaScopeInfo onto the function stack. But use the information
// that's already been calculated (ActOnLambdaExpr) when analyzing the
// template version, to prime the current LambdaScopeInfo.
if (isGenericLambdaCallOperatorSpecialization(D)) {
if (isGenericLambdaCallOperatorSpecialization(FD)) {
CXXMethodDecl *CallOperator = cast<CXXMethodDecl>(D);
CXXRecordDecl *LambdaClass = CallOperator->getParent();
LambdaExpr *LE = LambdaClass->getLambdaExpr();