class Capture

Declaration

class Capture { /* full declaration omitted */ };

Declared at: clang/include/clang/Sema/ScopeInfo.h:533

Member Variables

private anonymous struct / union
private clang::SourceLocation Loc
The source location at which the first capture occurred.
private clang::SourceLocation EllipsisLoc
The location of the ellipsis that expands a parameter pack.
private clang::QualType CaptureType
The type as it was captured, which is the type of the non-static data member that would hold the capture.
private unsigned int Kind
The CaptureKind of this capture.
private unsigned int Nested
Whether this is a nested capture (a capture of an enclosing capturing scope's capture).
private unsigned int CapturesThis
Whether this is a capture of '*this'.
private unsigned int ODRUsed
Whether an explicit capture has been odr-used in the body of the lambda.
private unsigned int NonODRUsed
Whether an explicit capture has been non-odr-used in the body of the lambda.
private unsigned int Invalid
Whether the capture is invalid (a capture was required but the entity is non-capturable).

Method Overview

Methods

Capture(clang::sema::Capture::IsThisCapture,
        bool IsNested,
        clang::SourceLocation Loc,
        clang::QualType CaptureType,
        const bool ByCopy,
        bool Invalid)

Declared at: clang/include/clang/Sema/ScopeInfo.h:602

Parameters

clang::sema::Capture::IsThisCapture
bool IsNested
clang::SourceLocation Loc
clang::QualType CaptureType
const bool ByCopy
bool Invalid

Capture(clang::sema::Capture::IsVLACapture,
        const clang::VariableArrayType* VLA,
        bool IsNested,
        clang::SourceLocation Loc,
        clang::QualType CaptureType)

Declared at: clang/include/clang/Sema/ScopeInfo.h:610

Parameters

clang::sema::Capture::IsVLACapture
const clang::VariableArrayType* VLA
bool IsNested
clang::SourceLocation Loc
clang::QualType CaptureType

Capture(clang::VarDecl* Var,
        bool Block,
        bool ByRef,
        bool IsNested,
        clang::SourceLocation Loc,
        clang::SourceLocation EllipsisLoc,
        clang::QualType CaptureType,
        bool Invalid)

Declared at: clang/include/clang/Sema/ScopeInfo.h:592

Parameters

clang::VarDecl* Var
bool Block
bool ByRef
bool IsNested
clang::SourceLocation Loc
clang::SourceLocation EllipsisLoc
clang::QualType CaptureType
bool Invalid

clang::QualType getCaptureType() const

Description

Retrieve the capture type for this capture, which is effectively the type of the non-static data member in the lambda/block structure that would store this capture.

Declared at: clang/include/clang/Sema/ScopeInfo.h:662

const clang::VariableArrayType*
getCapturedVLAType() const

Declared at: clang/include/clang/Sema/ScopeInfo.h:647

clang::SourceLocation getEllipsisLoc() const

Description

Retrieve the source location of the ellipsis, whose presence indicates that the capture is a pack expansion.

Declared at: clang/include/clang/Sema/ScopeInfo.h:657

clang::SourceLocation getLocation() const

Description

Retrieve the location at which this variable was captured.

Declared at: clang/include/clang/Sema/ScopeInfo.h:653

clang::VarDecl* getVariable() const

Declared at: clang/include/clang/Sema/ScopeInfo.h:642

bool isBlockCapture() const

Declared at: clang/include/clang/Sema/ScopeInfo.h:623

bool isCopyCapture() const

Declared at: clang/include/clang/Sema/ScopeInfo.h:621

bool isInitCapture() const

Description

Determine whether this capture is an init-capture.

Declared at: clang/include/clang/Sema/ScopeInfo.h:631

bool isInvalid() const

Declared at: clang/include/clang/Sema/ScopeInfo.h:628

bool isNested() const

Declared at: clang/include/clang/Sema/ScopeInfo.h:626

bool isNonODRUsed() const

Declared at: clang/include/clang/Sema/ScopeInfo.h:634

bool isODRUsed() const

Declared at: clang/include/clang/Sema/ScopeInfo.h:633

bool isReferenceCapture() const

Declared at: clang/include/clang/Sema/ScopeInfo.h:622

bool isThisCapture() const

Declared at: clang/include/clang/Sema/ScopeInfo.h:616

bool isVLATypeCapture() const

Declared at: clang/include/clang/Sema/ScopeInfo.h:624

bool isVariableCapture() const

Declared at: clang/include/clang/Sema/ScopeInfo.h:617

void markUsed(bool IsODRUse)

Declared at: clang/include/clang/Sema/ScopeInfo.h:635

Parameters

bool IsODRUse