Lines Matching refs:LP
331 static void addPlaceholderArgs(const LambdaProperties &LP, in addPlaceholderArgs() argument
335 ArrayRef<BindArgument> Args = LP.BindArguments; in addPlaceholderArgs()
548 LambdaProperties LP; in getLambdaProperties() local
556 LP.BindNamespace = NS->getName(); in getLambdaProperties()
558 LP.Callable.Type = getCallableType(Result); in getLambdaProperties()
559 LP.Callable.Materialization = getCallableMaterialization(Result); in getLambdaProperties()
560 LP.Callable.Decl = in getLambdaProperties()
561 getCallMethodDecl(Result, LP.Callable.Type, LP.Callable.Materialization); in getLambdaProperties()
562 LP.Callable.SourceTokens = getSourceTextForExpr(Result, CalleeExpr); in getLambdaProperties()
563 if (LP.Callable.Materialization == CMK_VariableRef) { in getLambdaProperties()
564 LP.Callable.CE = CE_Var; in getLambdaProperties()
565 LP.Callable.CM = CM_ByValue; in getLambdaProperties()
566 LP.Callable.UsageIdentifier = in getLambdaProperties()
568 LP.Callable.CaptureIdentifier = std::string( in getLambdaProperties()
570 } else if (LP.Callable.Materialization == CMK_CallExpression) { in getLambdaProperties()
571 LP.Callable.CE = CE_InitExpression; in getLambdaProperties()
572 LP.Callable.CM = CM_ByValue; in getLambdaProperties()
573 LP.Callable.UsageIdentifier = "Func"; in getLambdaProperties()
574 LP.Callable.CaptureIdentifier = "Func"; in getLambdaProperties()
575 LP.Callable.CaptureInitializer = getSourceTextForExpr(Result, CalleeExpr); in getLambdaProperties()
578 LP.BindArguments = buildBindArguments(Result, LP.Callable); in getLambdaProperties()
580 LP.IsFixitSupported = isFixitSupported(LP.Callable, LP.BindArguments); in getLambdaProperties()
582 return LP; in getLambdaProperties()
607 static void emitCaptureList(const LambdaProperties &LP, in emitCaptureList() argument
614 CaptureSet, "", LP.Callable.CM, LP.Callable.CE, in emitCaptureList()
615 LP.Callable.CaptureIdentifier, LP.Callable.CaptureInitializer, Stream); in emitCaptureList()
617 for (const BindArgument &B : LP.BindArguments) { in emitCaptureList()
660 LambdaProperties LP = getLambdaProperties(Result); in check() local
663 formatv("prefer a lambda to {0}::bind", LP.BindNamespace).str()); in check()
664 if (!LP.IsFixitSupported) in check()
673 emitCaptureList(LP, Result, Stream); in check()
676 ArrayRef<BindArgument> FunctionCallArgs = makeArrayRef(LP.BindArguments); in check()
678 addPlaceholderArgs(LP, Stream, PermissiveParameterList); in check()
680 if (LP.Callable.Type == CT_Function) { in check()
681 StringRef SourceTokens = LP.Callable.SourceTokens; in check()
684 } else if (LP.Callable.Type == CT_MemberFunction) { in check()
685 const auto *MethodDecl = dyn_cast<CXXMethodDecl>(LP.Callable.Decl); in check()
697 switch (LP.Callable.CE) { in check()
699 if (LP.Callable.UsageIdentifier != LP.Callable.CaptureIdentifier) { in check()
700 Stream << "(" << LP.Callable.UsageIdentifier << ")"; in check()
705 Stream << LP.Callable.UsageIdentifier; in check()
714 addFunctionCallArgs(getForwardedArgumentList(LP), Stream); in check()