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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191646
91177308-0d34-0410-b5e6-
96231b3b80d8
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;
}
// 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();