class CapturingScopeInfo
Declaration
class CapturingScopeInfo : public FunctionScopeInfo { /* full declaration omitted */ };
Description
Retains information about a function, method, or block that is currently being parsed.
Declared at: clang/include/clang/Sema/ScopeInfo.h:665
Inherits from: FunctionScopeInfo
Member Variables
- public clang::sema::CapturingScopeInfo:: ImplicitCaptureStyle ImpCaptureStyle
- public llvm::DenseMap<VarDecl*, unsigned int> CaptureMap
- CaptureMap - A map of captured variables to (index+1) into Captures.
- public unsigned int CXXThisCaptureIndex = 0
- CXXThisCaptureIndex - The (index+1) of the capture of 'this'; zero if 'this' is not captured.
- public SmallVector<clang::sema::Capture, 4> Captures
- Captures - The captures.
- public bool HasImplicitReturnType = false
- - Whether the target type of return statements in this context is deduced (e.g. a lambda or block with omitted return type).
- public clang::QualType ReturnType
- ReturnType - The target type of return statements in this context, or null if unknown.
Inherited from FunctionScopeInfo:
- public Kind
- public HasBranchProtectedScope
- public HasBranchIntoScope
- public HasIndirectGoto
- public HasMustTail
- public HasDroppedStmt
- public HasOMPDeclareReductionCombiner
- public HasFallthroughStmt
- public UsesFPIntrin
- public HasPotentialAvailabilityViolations
- public ObjCShouldCallSuper
- public ObjCIsDesignatedInit
- public ObjCWarnForNoDesignatedInitChain
- public ObjCIsSecondaryInit
- public ObjCWarnForNoInitDelegation
- public NeedsCoroutineSuspends
- public FirstCoroutineStmtKind
- public FirstCoroutineStmtLoc
- public FirstReturnLoc
- public FirstCXXOrObjCTryLoc
- public FirstTryType = Unknown
- public FirstSEHTryLoc
- public SwitchStack
- public Returns
- public CoroutinePromise = nullptr
- public CoroutineParameterMoves
- public CoroutineSuspends
- public CompoundScopes
- public Blocks
- public ByrefBlockVars
- public PossiblyUnreachableDiags
- public ModifiedNonNullParams
Method Overview
- protected CapturingScopeInfo(const clang::sema::CapturingScopeInfo &)
- public CapturingScopeInfo(clang::DiagnosticsEngine & Diag, clang::sema::CapturingScopeInfo::ImplicitCaptureStyle Style)
- public void addCapture(clang::VarDecl * Var, bool isBlock, bool isByref, bool isNested, clang::SourceLocation Loc, clang::SourceLocation EllipsisLoc, clang::QualType CaptureType, bool Invalid)
- public void addThisCapture(bool isNested, clang::SourceLocation Loc, clang::QualType CaptureType, bool ByCopy)
- public void addVLATypeCapture(clang::SourceLocation Loc, const clang::VariableArrayType * VLAType, clang::QualType CaptureType)
- public static bool classof(const clang::sema::FunctionScopeInfo * FSI)
- public clang::sema::Capture & getCXXThisCapture()
- public clang::sema::Capture & getCapture(clang::VarDecl * Var)
- public const clang::sema::Capture & getCapture(clang::VarDecl * Var) const
- public bool isCXXThisCaptured() const
- public bool isCaptured(clang::VarDecl * Var) const
- public bool isVLATypeCaptured(const clang::VariableArrayType * VAT) const
Inherited from FunctionScopeInfo:
- public Clear
- public NeedsScopeChecking
- public addBlock
- public addByrefBlockVar
- public getFirstCoroutineStmtKeyword
- public getWeakObjectUses
- public hasInvalidCoroutineSuspends
- public hasUnrecoverableErrorOccurred
- public isCoroutine
- public isPlainFunction
- public markSafeWeakUse
- public recordUseOfWeak
- public recordUseOfWeak
- public setCoroutineSuspends
- public setFirstCoroutineStmt
- public setHasBranchIntoScope
- public setHasBranchProtectedScope
- public setHasCXXTry
- public setHasDroppedStmt
- public setHasFallthroughStmt
- public setHasIndirectGoto
- public setHasMustTail
- public setHasOMPDeclareReductionCombiner
- public setHasObjCTry
- public setHasSEHTry
- public setNeedsCoroutineSuspends
- public setUsesFPIntrin
Methods
¶CapturingScopeInfo(
const clang::sema::CapturingScopeInfo&)
CapturingScopeInfo(
const clang::sema::CapturingScopeInfo&)
Declared at: clang/include/clang/Sema/ScopeInfo.h:667
Parameters
¶CapturingScopeInfo(
clang::DiagnosticsEngine& Diag,
clang::sema::CapturingScopeInfo::
ImplicitCaptureStyle Style)
CapturingScopeInfo(
clang::DiagnosticsEngine& Diag,
clang::sema::CapturingScopeInfo::
ImplicitCaptureStyle Style)
Declared at: clang/include/clang/Sema/ScopeInfo.h:677
Parameters
- clang::DiagnosticsEngine& Diag
- clang::sema::CapturingScopeInfo:: ImplicitCaptureStyle Style
¶void addCapture(clang::VarDecl* Var,
bool isBlock,
bool isByref,
bool isNested,
clang::SourceLocation Loc,
clang::SourceLocation EllipsisLoc,
clang::QualType CaptureType,
bool Invalid)
void addCapture(clang::VarDecl* Var,
bool isBlock,
bool isByref,
bool isNested,
clang::SourceLocation Loc,
clang::SourceLocation EllipsisLoc,
clang::QualType CaptureType,
bool Invalid)
Declared at: clang/include/clang/Sema/ScopeInfo.h:698
Parameters
- clang::VarDecl* Var
- bool isBlock
- bool isByref
- bool isNested
- clang::SourceLocation Loc
- clang::SourceLocation EllipsisLoc
- clang::QualType CaptureType
- bool Invalid
¶void addThisCapture(bool isNested,
clang::SourceLocation Loc,
clang::QualType CaptureType,
bool ByCopy)
void addThisCapture(bool isNested,
clang::SourceLocation Loc,
clang::QualType CaptureType,
bool ByCopy)
Declared at: clang/include/clang/Sema/ScopeInfo.h:712
Parameters
- bool isNested
- clang::SourceLocation Loc
- clang::QualType CaptureType
- bool ByCopy
¶void addVLATypeCapture(
clang::SourceLocation Loc,
const clang::VariableArrayType* VLAType,
clang::QualType CaptureType)
void addVLATypeCapture(
clang::SourceLocation Loc,
const clang::VariableArrayType* VLAType,
clang::QualType CaptureType)
Declared at: clang/include/clang/Sema/ScopeInfo.h:706
Parameters
- clang::SourceLocation Loc
- const clang::VariableArrayType* VLAType
- clang::QualType CaptureType
¶static bool classof(
const clang::sema::FunctionScopeInfo* FSI)
static bool classof(
const clang::sema::FunctionScopeInfo* FSI)
Declared at: clang/include/clang/Sema/ScopeInfo.h:746
Parameters
- const clang::sema::FunctionScopeInfo* FSI
¶clang::sema::Capture& getCXXThisCapture()
clang::sema::Capture& getCXXThisCapture()
Description
Retrieve the capture of C++ 'this', if it has been captured.
Declared at: clang/include/clang/Sema/ScopeInfo.h:719
¶clang::sema::Capture& getCapture(
clang::VarDecl* Var)
clang::sema::Capture& getCapture(
clang::VarDecl* Var)
Description
Retrieve the capture of the given variable, if it has been captured already.
Declared at: clang/include/clang/Sema/ScopeInfo.h:734
Parameters
- clang::VarDecl* Var
¶const clang::sema::Capture& getCapture(
clang::VarDecl* Var) const
const clang::sema::Capture& getCapture(
clang::VarDecl* Var) const
Declared at: clang/include/clang/Sema/ScopeInfo.h:739
Parameters
- clang::VarDecl* Var
¶bool isCXXThisCaptured() const
bool isCXXThisCaptured() const
Description
Determine whether the C++ 'this' is captured.
Declared at: clang/include/clang/Sema/ScopeInfo.h:716
¶bool isCaptured(clang::VarDecl* Var) const
bool isCaptured(clang::VarDecl* Var) const
Description
Determine whether the given variable has been captured.
Declared at: clang/include/clang/Sema/ScopeInfo.h:725
Parameters
- clang::VarDecl* Var
¶bool isVLATypeCaptured(
const clang::VariableArrayType* VAT) const
bool isVLATypeCaptured(
const clang::VariableArrayType* VAT) const
Description
Determine whether the given variable-array type has been captured.
Declared at: clang/include/clang/Sema/ScopeInfo.h:730
Parameters
- const clang::VariableArrayType* VAT