forked from OSchip/llvm-project
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:
parent
db29268b10
commit
f9a9af3c3d
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue