Home | History | Annotate | Download | only in Sema

Lines Matching full:capture

28 /// enclosing lambda (to the current lambda) that is 'capture-ready' for 
31 /// of the capture-ready lambda's LambdaScopeInfo.
35 /// lambda that is ready to capture the \p VarToCapture being referenced in
38 /// that is the lambda with the highest index that is 'capture-ready'.
40 /// A lambda 'L' is capture-ready for 'V' (var or this) if:
44 /// stack), can all capture or have already captured V.
45 /// If \p VarToCapture is 'null' then we are trying to capture 'this'.
47 /// Note that a lambda that is deemed 'capture-ready' still needs to be checked
48 /// for whether it is 'capture-capable' (see
50 /// capture.
55 /// \param VarToCapture - the variable to capture. If NULL, capture 'this'.
59 /// which is capture-ready. If the return value evaluates to 'false' then
60 /// no lambda is capture-ready for \p VarToCapture.
66 // Label failure to capture.
74 // If VarToCapture is null, we are attempting to capture 'this'.
87 // the variable declaration - it obviously can/must not capture the
91 // arrived here) - so we don't yet have a lambda that can capture the
97 // For an enclosing lambda to be capture ready for an entity, all
98 // intervening lambda's have to be able to capture that entity. If even
100 // then no enclosing lambda can ever capture that entity.
104 // [](auto b) { #2 <-- an intervening lambda that can never capture 'x'
106 // f(x, c); <-- can not lead to x's speculative capture by #1 or #2
108 // If they do not have a default implicit capture, check to see
111 // to ever capture this variable, there is no further enclosing
112 // non-dependent lambda that can capture this variable.
129 // (one index above) is capture-ready.
136 /// enclosing lambda (to the current lambda) that is 'capture-capable' for
139 /// of the capture-capable lambda's LambdaScopeInfo.
143 /// current lambda at the top of the stack) that can truly capture
145 /// a) 'capture-ready' - be the innermost lambda that is 'capture-ready':
148 /// lambda can either implicitly or explicitly capture the variable.
151 /// b) 'capture-capable' - make sure the 'capture-ready' lambda can truly
152 /// capture the variable by checking all its enclosing lambdas:
153 /// - check if all outer lambdas enclosing the 'capture-ready' lambda
154 /// identified above in 'a' can also capture the variable (this is done
162 /// \param VarToCapture - the variable to capture. If NULL, capture 'this'.
167 /// which is capture-capable. If the return value evaluates to 'false' then
168 /// no lambda is capture-capable for \p VarToCapture.
185 "The capture ready lambda for a potential capture can only be the "
191 // If VarToCapture is null, we are attempting to capture 'this'
196 // Check if the capture-ready lambda can truly capture the variable, by
197 // checking whether all enclosing lambdas of the capture-ready lambda allow
198 // the capture - i.e. make sure it is capture-capable.
210 // Check if the capture-ready lambda can truly capture 'this' by checking
211 // whether all enclosing lambdas of the capture-ready lambda can capture
792 // The init-capture initialization is a full-expression that must be
810 // Create a dummy variable representing the init-capture. This is not actually
812 // init-capture.
943 // capture-default or simple-capture in its lambda-introducer.
948 // For DR1632, we also allow a capture-default in any context where we can
957 // Distinct capture names, for diagnostics.
968 // lambda-capture.
978 // If a lambda-capture includes a capture-default that is =, the
979 // lambda-capture shall not contain this [...].
1000 assert(C->Id && "missing identifier for capture");
1014 // is not, then an error has occurred - so ignore the capture for now.
1016 // FIXME: we should create the init capture variable and mark it invalid
1023 // An init-capture behaves as if it declares and explicitly
1030 // If a lambda-capture includes a capture-default that is &, the
1031 // identifiers in the lambda-capture shall not be preceded by &.
1032 // If a lambda-capture includes a capture-default that is =, [...]
1047 // The identifiers in a capture-list are looked up using the usual
1069 // lambda-capture.
1077 // Previous capture captured something different (one or both was
1103 // A capture followed by an ellipsis is a pack expansion (14.5.3).
1414 LambdaScopeInfo::Capture From = LSI->Captures[I];
1415 assert(!From.isBlockCapture() && "Cannot capture __block variables");
1418 // Handle 'this' capture.
1456 llvm_unreachable("block capture in lambda");
1504 // The closure type for a lambda-expression with no lambda-capture
1621 // Add capture. The capture uses a fake variable, which doesn't correspond
1630 BlockDecl::Capture Capture(/*Variable=*/CapVar, /*ByRef=*/false,
1632 Block->setCaptures(Context, &Capture, &Capture + 1,