forked from OSchip/llvm-project
parent
fff5ec035b
commit
5690454bd6
|
@ -545,12 +545,11 @@ public:
|
|||
//
|
||||
// Here R is the return type of the lambda and P1, P2, ... are
|
||||
// its parameter types. 'Lambda' is a fake VarDecl captured by the block
|
||||
// that is initialized to a copy of the the lambda.
|
||||
// that is initialized to a copy of the lambda.
|
||||
//
|
||||
// Sema leaves the body of a lambda-converted block empty (it is
|
||||
// produced by CodeGen), so we can't analyze it directly. Instead, we skip
|
||||
// the block body and analyze the operator() method on the the captured
|
||||
// lambda.
|
||||
// the block body and analyze the operator() method on the captured lambda.
|
||||
const VarDecl *LambdaVD = getRegionStoringCapturedLambda()->getDecl();
|
||||
const CXXRecordDecl *LambdaDecl = LambdaVD->getType()->getAsCXXRecordDecl();
|
||||
CXXMethodDecl* LambdaCallOperator = LambdaDecl->getLambdaCallOperator();
|
||||
|
|
|
@ -316,7 +316,7 @@ private:
|
|||
// The analyzer may stop exploring if it sees a state it has previously
|
||||
// visited ("cache out"). The early return here is a defensive check to
|
||||
// prevent accidental caching out by checker API clients. Unless there is a
|
||||
// tag or the the client checker has requested that the generated node be
|
||||
// tag or the client checker has requested that the generated node be
|
||||
// marked as a sink, we assume that a client requesting a transition to a
|
||||
// state that is the same as the predecessor state has made a mistake. We
|
||||
// return the predecessor rather than cache out.
|
||||
|
|
|
@ -605,7 +605,7 @@ void BlockCall::getInitialStackFrameContents(const StackFrameContext *CalleeCtx,
|
|||
Params = LambdaOperatorDecl->parameters();
|
||||
|
||||
// For blocks converted from a C++ lambda, the callee declaration is the
|
||||
// operator() method on the the lambda so we bind "this" to
|
||||
// operator() method on the lambda so we bind "this" to
|
||||
// the lambda captured by the block.
|
||||
const VarRegion *CapturedLambdaRegion = getRegionStoringCapturedLambda();
|
||||
SVal ThisVal = loc::MemRegionVal(CapturedLambdaRegion);
|
||||
|
|
Loading…
Reference in New Issue