clang 18.0.0git
Classes | Public Types | Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | List of all members
clang::sema::FunctionScopeInfo Class Reference

Retains information about a function, method, or block that is currently being parsed. More...

#include "clang/Sema/ScopeInfo.h"

Inheritance diagram for clang::sema::FunctionScopeInfo:
Inheritance graph
[legend]

Classes

class  WeakObjectProfileTy
 Represents a simple identification of a weak object. More...
 
class  WeakUseTy
 Represents a single use of a weak object. More...
 

Public Types

enum  { TryLocIsCXX , TryLocIsObjC , Unknown }
 
using SwitchInfo = llvm::PointerIntPair< SwitchStmt *, 1, bool >
 A SwitchStmt, along with a flag indicating if its list of case statements is incomplete (because we dropped an invalid one while parsing).
 
using WeakUseVector = SmallVector< WeakUseTy, 4 >
 Used to collect uses of a particular weak object in a function body.
 
using WeakObjectUseMap = llvm::SmallDenseMap< WeakObjectProfileTy, WeakUseVector, 8, WeakObjectProfileTy::DenseMapInfo >
 Used to collect all uses of weak objects in a function body.
 

Public Member Functions

 FunctionScopeInfo (DiagnosticsEngine &Diag)
 
virtual ~FunctionScopeInfo ()
 
bool hasUnrecoverableErrorOccurred () const
 Determine whether an unrecoverable error has occurred within this function.
 
template<typename ExprT >
void recordUseOfWeak (const ExprT *E, bool IsRead=true)
 Record that a weak object was accessed.
 
void recordUseOfWeak (const ObjCMessageExpr *Msg, const ObjCPropertyDecl *Prop)
 
void markSafeWeakUse (const Expr *E)
 Record that a given expression is a "safe" access of a weak object (e.g.
 
const WeakObjectUseMapgetWeakObjectUses () const
 
void setHasBranchIntoScope ()
 
void setHasBranchProtectedScope ()
 
void setHasIndirectGoto ()
 
void setHasMustTail ()
 
void setHasDroppedStmt ()
 
void setHasOMPDeclareReductionCombiner ()
 
void setHasFallthroughStmt ()
 
void setUsesFPIntrin ()
 
void setHasCXXTry (SourceLocation TryLoc)
 
void setHasObjCTry (SourceLocation TryLoc)
 
void setHasSEHTry (SourceLocation TryLoc)
 
bool NeedsScopeChecking () const
 
void addBlock (const BlockDecl *BD)
 
void addByrefBlockVar (VarDecl *VD)
 
bool isCoroutine () const
 
void setFirstCoroutineStmt (SourceLocation Loc, StringRef Keyword)
 
StringRef getFirstCoroutineStmtKeyword () const
 
void setNeedsCoroutineSuspends (bool value=true)
 
bool hasInvalidCoroutineSuspends () const
 
void setCoroutineSuspends (Stmt *Initial, Stmt *Final)
 
void Clear ()
 Clear out the information in this function scope, making it suitable for reuse.
 
bool isPlainFunction () const
 

Public Attributes

ScopeKind Kind: 3
 What kind of scope we are describing.
 
bool HasBranchProtectedScope: 1
 Whether this function contains a VLA, @try, try, C++ initializer, or anything else that can't be jumped past.
 
bool HasBranchIntoScope: 1
 Whether this function contains any switches or direct gotos.
 
bool HasIndirectGoto: 1
 Whether this function contains any indirect gotos.
 
bool HasMustTail: 1
 Whether this function contains any statement marked with [[clang::musttail]].
 
bool HasDroppedStmt: 1
 Whether a statement was dropped because it was invalid.
 
bool HasOMPDeclareReductionCombiner: 1
 True if current scope is for OpenMP declare reduction combiner.
 
bool HasFallthroughStmt: 1
 Whether there is a fallthrough statement in this function.
 
bool UsesFPIntrin: 1
 Whether this function uses constrained floating point intrinsics.
 
bool HasPotentialAvailabilityViolations: 1
 Whether we make reference to a declaration that could be unavailable.
 
bool ObjCShouldCallSuper: 1
 A flag that is set when parsing a method that must call super's implementation, such as -dealloc, -finalize, or any method marked with __attribute__((objc_requires_super)).
 
bool ObjCIsDesignatedInit: 1
 True when this is a method marked as a designated initializer.
 
bool ObjCWarnForNoDesignatedInitChain: 1
 This starts true for a method marked as designated initializer and will be set to false if there is an invocation to a designated initializer of the super class.
 
bool ObjCIsSecondaryInit: 1
 True when this is an initializer method not marked as a designated initializer within a class that has at least one initializer marked as a designated initializer.
 
bool ObjCWarnForNoInitDelegation: 1
 This starts true for a secondary initializer method and will be set to false if there is an invocation of an initializer on 'self'.
 
bool NeedsCoroutineSuspends: 1
 True only when this function has not already built, or attempted to build, the initial and final coroutine suspend points.
 
unsigned char FirstCoroutineStmtKind: 2
 An enumeration represeting the kind of the first coroutine statement in the function.
 
bool FoundImmediateEscalatingExpression: 1
 Whether we found an immediate-escalating expression.
 
SourceLocation FirstCoroutineStmtLoc
 First coroutine statement in the current function.
 
SourceLocation FirstReturnLoc
 First 'return' statement in the current function.
 
SourceLocation FirstCXXOrObjCTryLoc
 First C++ 'try' or ObjC @try statement in the current function.
 
enum clang::sema::FunctionScopeInfo:: { ... }  FirstTryType = Unknown
 
SourceLocation FirstSEHTryLoc
 First SEH '__try' statement in the current function.
 
SmallVector< SwitchInfo, 8 > SwitchStack
 SwitchStack - This is the current set of active switch statements in the block.
 
SmallVector< ReturnStmt *, 4 > Returns
 The list of return statements that occur within the function or block, if there is any chance of applying the named return value optimization, or if we need to infer a return type.
 
VarDeclCoroutinePromise = nullptr
 The promise object for this coroutine, if any.
 
llvm::SmallMapVector< ParmVarDecl *, Stmt *, 4 > CoroutineParameterMoves
 A mapping between the coroutine function parameters that were moved to the coroutine frame, and their move statements.
 
std::pair< Stmt *, Stmt * > CoroutineSuspends
 The initial and final coroutine suspend points.
 
SmallVector< CompoundScopeInfo, 4 > CompoundScopes
 The stack of currently active compound stamement scopes in the function.
 
llvm::SmallPtrSet< const BlockDecl *, 1 > Blocks
 The set of blocks that are introduced in this function.
 
llvm::TinyPtrVector< VarDecl * > ByrefBlockVars
 The set of __block variables that are introduced in this function.
 
SmallVector< PossiblyUnreachableDiag, 4 > PossiblyUnreachableDiags
 A list of PartialDiagnostics created but delayed within the current function scope.
 
llvm::SmallPtrSet< const ParmVarDecl *, 8 > ModifiedNonNullParams
 A list of parameters which have the nonnull attribute and are modified in the function.
 
llvm::SmallVector< AddrLabelExpr *, 4 > AddrLabels
 The set of GNU address of label extension "&&label".
 

Protected Types

enum  ScopeKind { SK_Function , SK_Block , SK_Lambda , SK_CapturedRegion }
 

Protected Member Functions

 FunctionScopeInfo (const FunctionScopeInfo &)=default
 

Detailed Description

Retains information about a function, method, or block that is currently being parsed.

Definition at line 102 of file ScopeInfo.h.

Member Typedef Documentation

◆ SwitchInfo

using clang::sema::FunctionScopeInfo::SwitchInfo = llvm::PointerIntPair<SwitchStmt*, 1, bool>

A SwitchStmt, along with a flag indicating if its list of case statements is incomplete (because we dropped an invalid one while parsing).

Definition at line 199 of file ScopeInfo.h.

◆ WeakObjectUseMap

Used to collect all uses of weak objects in a function body.

Part of the implementation of -Wrepeated-use-of-weak.

Definition at line 372 of file ScopeInfo.h.

◆ WeakUseVector

Used to collect uses of a particular weak object in a function body.

Part of the implementation of -Wrepeated-use-of-weak.

Definition at line 367 of file ScopeInfo.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
TryLocIsCXX 
TryLocIsObjC 
Unknown 

Definition at line 187 of file ScopeInfo.h.

◆ ScopeKind

Enumerator
SK_Function 
SK_Block 
SK_Lambda 
SK_CapturedRegion 

Definition at line 104 of file ScopeInfo.h.

Constructor & Destructor Documentation

◆ FunctionScopeInfo() [1/2]

clang::sema::FunctionScopeInfo::FunctionScopeInfo ( const FunctionScopeInfo )
protecteddefault

◆ FunctionScopeInfo() [2/2]

clang::sema::FunctionScopeInfo::FunctionScopeInfo ( DiagnosticsEngine Diag)
inline

Definition at line 386 of file ScopeInfo.h.

◆ ~FunctionScopeInfo()

FunctionScopeInfo::~FunctionScopeInfo ( )
virtual

Definition at line 251 of file ScopeInfo.cpp.

Member Function Documentation

◆ addBlock()

void clang::sema::FunctionScopeInfo::addBlock ( const BlockDecl BD)
inline

Definition at line 482 of file ScopeInfo.h.

References Blocks.

Referenced by clang::Sema::ActOnBlockStmtExpr().

◆ addByrefBlockVar()

void clang::sema::FunctionScopeInfo::addByrefBlockVar ( VarDecl VD)
inline

Definition at line 487 of file ScopeInfo.h.

References ByrefBlockVars.

Referenced by clang::Sema::CheckCompleteVariableDeclaration().

◆ Clear()

void FunctionScopeInfo::Clear ( )

◆ getFirstCoroutineStmtKeyword()

StringRef clang::sema::FunctionScopeInfo::getFirstCoroutineStmtKeyword ( ) const
inline

◆ getWeakObjectUses()

const WeakObjectUseMap & clang::sema::FunctionScopeInfo::getWeakObjectUses ( ) const
inline

Definition at line 425 of file ScopeInfo.h.

Referenced by diagnoseRepeatedUseOfWeak().

◆ hasInvalidCoroutineSuspends()

bool clang::sema::FunctionScopeInfo::hasInvalidCoroutineSuspends ( ) const
inline

Definition at line 521 of file ScopeInfo.h.

References CoroutineSuspends, and NeedsCoroutineSuspends.

◆ hasUnrecoverableErrorOccurred()

bool clang::sema::FunctionScopeInfo::hasUnrecoverableErrorOccurred ( ) const
inline

Determine whether an unrecoverable error has occurred within this function.

Note that this may return false even if the function body is invalid, because the errors may be suppressed if they're caused by prior invalid declarations.

FIXME: Migrate the caller of this to use containsErrors() instead once it's ready.

Definition at line 406 of file ScopeInfo.h.

References clang::DiagnosticErrorTrap::hasUnrecoverableErrorOccurred().

Referenced by clang::Sema::hasAnyUnrecoverableErrorsInThisFunction().

◆ isCoroutine()

bool clang::sema::FunctionScopeInfo::isCoroutine ( ) const
inline

◆ isPlainFunction()

bool clang::sema::FunctionScopeInfo::isPlainFunction ( ) const
inline

Definition at line 537 of file ScopeInfo.h.

References Kind, and SK_Function.

◆ markSafeWeakUse()

void FunctionScopeInfo::markSafeWeakUse ( const Expr E)

Record that a given expression is a "safe" access of a weak object (e.g.

assigning it to a strong variable.)

Part of the implementation of -Wrepeated-use-of-weak.

Definition at line 160 of file ScopeInfo.cpp.

References clang::ObjCPropertyDecl::findPropertyDecl(), clang::PseudoObjectExpr::getSyntacticForm(), clang::Expr::IgnoreParenCasts(), and markSafeWeakUse().

Referenced by clang::Sema::CheckAssignmentOperands(), clang::Sema::checkUnsafeExprAssigns(), and markSafeWeakUse().

◆ NeedsScopeChecking()

bool clang::sema::FunctionScopeInfo::NeedsScopeChecking ( ) const
inline

◆ recordUseOfWeak() [1/2]

template<typename ExprT >
void clang::sema::FunctionScopeInfo::recordUseOfWeak ( const ExprT *  E,
bool  IsRead = true 
)
inline

Record that a weak object was accessed.

Part of the implementation of -Wrepeated-use-of-weak.

Definition at line 1058 of file ScopeInfo.h.

Referenced by clang::Sema::BuildDeclRefExpr(), clang::Sema::BuildInstanceMessage(), clang::Sema::BuildIvarRefExpr(), and LookupMemberExpr().

◆ recordUseOfWeak() [2/2]

void FunctionScopeInfo::recordUseOfWeak ( const ObjCMessageExpr Msg,
const ObjCPropertyDecl Prop 
)

◆ setCoroutineSuspends()

void clang::sema::FunctionScopeInfo::setCoroutineSuspends ( Stmt Initial,
Stmt Final 
)
inline

Definition at line 525 of file ScopeInfo.h.

References CoroutineSuspends, and NeedsCoroutineSuspends.

◆ setFirstCoroutineStmt()

void clang::sema::FunctionScopeInfo::setFirstCoroutineStmt ( SourceLocation  Loc,
StringRef  Keyword 
)
inline

◆ setHasBranchIntoScope()

void clang::sema::FunctionScopeInfo::setHasBranchIntoScope ( )
inline

Definition at line 429 of file ScopeInfo.h.

References HasBranchIntoScope.

◆ setHasBranchProtectedScope()

void clang::sema::FunctionScopeInfo::setHasBranchProtectedScope ( )
inline

◆ setHasCXXTry()

void clang::sema::FunctionScopeInfo::setHasCXXTry ( SourceLocation  TryLoc)
inline

◆ setHasDroppedStmt()

void clang::sema::FunctionScopeInfo::setHasDroppedStmt ( )
inline

Definition at line 443 of file ScopeInfo.h.

References HasDroppedStmt.

◆ setHasFallthroughStmt()

void clang::sema::FunctionScopeInfo::setHasFallthroughStmt ( )
inline

Definition at line 451 of file ScopeInfo.h.

References HasFallthroughStmt.

◆ setHasIndirectGoto()

void clang::sema::FunctionScopeInfo::setHasIndirectGoto ( )
inline

Definition at line 437 of file ScopeInfo.h.

References HasIndirectGoto.

◆ setHasMustTail()

void clang::sema::FunctionScopeInfo::setHasMustTail ( )
inline

Definition at line 441 of file ScopeInfo.h.

References HasMustTail.

◆ setHasObjCTry()

void clang::sema::FunctionScopeInfo::setHasObjCTry ( SourceLocation  TryLoc)
inline

◆ setHasOMPDeclareReductionCombiner()

void clang::sema::FunctionScopeInfo::setHasOMPDeclareReductionCombiner ( )
inline

◆ setHasSEHTry()

void clang::sema::FunctionScopeInfo::setHasSEHTry ( SourceLocation  TryLoc)
inline

Definition at line 471 of file ScopeInfo.h.

References FirstSEHTryLoc, and setHasBranchProtectedScope().

Referenced by clang::Sema::ActOnSEHTryBlock().

◆ setNeedsCoroutineSuspends()

void clang::sema::FunctionScopeInfo::setNeedsCoroutineSuspends ( bool  value = true)
inline

Definition at line 515 of file ScopeInfo.h.

References CoroutineSuspends, and NeedsCoroutineSuspends.

◆ setUsesFPIntrin()

void clang::sema::FunctionScopeInfo::setUsesFPIntrin ( )
inline

Definition at line 455 of file ScopeInfo.h.

References UsesFPIntrin.

Referenced by clang::Sema::ActOnAfterCompoundStatementLeadingPragmas().

Member Data Documentation

◆ AddrLabels

llvm::SmallVector<AddrLabelExpr *, 4> clang::sema::FunctionScopeInfo::AddrLabels

The set of GNU address of label extension "&&label".

Definition at line 240 of file ScopeInfo.h.

Referenced by clang::Sema::ActOnAddrLabel(), clang::Sema::CheckCompletedCoroutineBody(), and Clear().

◆ Blocks

llvm::SmallPtrSet<const BlockDecl *, 1> clang::sema::FunctionScopeInfo::Blocks

The set of blocks that are introduced in this function.

Definition at line 225 of file ScopeInfo.h.

Referenced by addBlock(), Clear(), and markEscapingByrefs().

◆ ByrefBlockVars

llvm::TinyPtrVector<VarDecl *> clang::sema::FunctionScopeInfo::ByrefBlockVars

The set of __block variables that are introduced in this function.

Definition at line 228 of file ScopeInfo.h.

Referenced by addByrefBlockVar(), Clear(), and markEscapingByrefs().

◆ CompoundScopes

SmallVector<CompoundScopeInfo, 4> clang::sema::FunctionScopeInfo::CompoundScopes

◆ CoroutineParameterMoves

llvm::SmallMapVector<ParmVarDecl *, Stmt *, 4> clang::sema::FunctionScopeInfo::CoroutineParameterMoves

A mapping between the coroutine function parameters that were moved to the coroutine frame, and their move statements.

Definition at line 215 of file ScopeInfo.h.

Referenced by Clear(), and clang::CoroutineStmtBuilder::CoroutineStmtBuilder().

◆ CoroutinePromise

VarDecl* clang::sema::FunctionScopeInfo::CoroutinePromise = nullptr

The promise object for this coroutine, if any.

Definition at line 211 of file ScopeInfo.h.

Referenced by clang::Sema::CheckCompletedCoroutineBody(), CheckFallThroughForBody(), Clear(), and clang::CoroutineStmtBuilder::CoroutineStmtBuilder().

◆ CoroutineSuspends

std::pair<Stmt *, Stmt *> clang::sema::FunctionScopeInfo::CoroutineSuspends

The initial and final coroutine suspend points.

Definition at line 218 of file ScopeInfo.h.

Referenced by Clear(), hasInvalidCoroutineSuspends(), setCoroutineSuspends(), and setNeedsCoroutineSuspends().

◆ FirstCoroutineStmtKind

unsigned char clang::sema::FunctionScopeInfo::FirstCoroutineStmtKind

An enumeration represeting the kind of the first coroutine statement in the function.

One of co_return, co_await, or co_yield.

Definition at line 173 of file ScopeInfo.h.

Referenced by getFirstCoroutineStmtKeyword(), and setFirstCoroutineStmt().

◆ FirstCoroutineStmtLoc

SourceLocation clang::sema::FunctionScopeInfo::FirstCoroutineStmtLoc

First coroutine statement in the current function.

(ex co_return, co_await, co_yield)

Definition at line 180 of file ScopeInfo.h.

Referenced by clang::Sema::CheckCompletedCoroutineBody(), Clear(), diagReturnOnAllocFailure(), getFirstCoroutineStmtKeyword(), isCoroutine(), noteMemberDeclaredHere(), and setFirstCoroutineStmt().

◆ FirstCXXOrObjCTryLoc

SourceLocation clang::sema::FunctionScopeInfo::FirstCXXOrObjCTryLoc

First C++ 'try' or ObjC @try statement in the current function.

Definition at line 186 of file ScopeInfo.h.

Referenced by clang::Sema::ActOnSEHTryBlock(), Clear(), setHasCXXTry(), and setHasObjCTry().

◆ FirstReturnLoc

SourceLocation clang::sema::FunctionScopeInfo::FirstReturnLoc

First 'return' statement in the current function.

Definition at line 183 of file ScopeInfo.h.

Referenced by clang::Sema::CheckCompletedCoroutineBody(), and Clear().

◆ FirstSEHTryLoc

SourceLocation clang::sema::FunctionScopeInfo::FirstSEHTryLoc

First SEH '__try' statement in the current function.

Definition at line 190 of file ScopeInfo.h.

Referenced by clang::Sema::ActOnCXXTryBlock(), clang::Sema::ActOnObjCAtTryStmt(), Clear(), and setHasSEHTry().

◆ 

enum { ... } clang::sema::FunctionScopeInfo::FirstTryType

◆ FoundImmediateEscalatingExpression

bool clang::sema::FunctionScopeInfo::FoundImmediateEscalatingExpression

Whether we found an immediate-escalating expression.

Definition at line 176 of file ScopeInfo.h.

Referenced by clang::Sema::CheckImmediateEscalatingFunctionDefinition(), Clear(), and clang::Sema::MarkExpressionAsImmediateEscalating().

◆ HasBranchIntoScope

bool clang::sema::FunctionScopeInfo::HasBranchIntoScope

Whether this function contains any switches or direct gotos.

Definition at line 120 of file ScopeInfo.h.

Referenced by Clear(), NeedsScopeChecking(), and setHasBranchIntoScope().

◆ HasBranchProtectedScope

bool clang::sema::FunctionScopeInfo::HasBranchProtectedScope

Whether this function contains a VLA, @try, try, C++ initializer, or anything else that can't be jumped past.

Definition at line 117 of file ScopeInfo.h.

Referenced by Clear(), NeedsScopeChecking(), and setHasBranchProtectedScope().

◆ HasDroppedStmt

bool clang::sema::FunctionScopeInfo::HasDroppedStmt

Whether a statement was dropped because it was invalid.

Definition at line 130 of file ScopeInfo.h.

Referenced by Clear(), NeedsScopeChecking(), and setHasDroppedStmt().

◆ HasFallthroughStmt

bool clang::sema::FunctionScopeInfo::HasFallthroughStmt

Whether there is a fallthrough statement in this function.

Definition at line 136 of file ScopeInfo.h.

Referenced by Clear(), clang::sema::AnalysisBasedWarnings::IssueWarnings(), and setHasFallthroughStmt().

◆ HasIndirectGoto

bool clang::sema::FunctionScopeInfo::HasIndirectGoto

Whether this function contains any indirect gotos.

Definition at line 123 of file ScopeInfo.h.

Referenced by Clear(), NeedsScopeChecking(), and setHasIndirectGoto().

◆ HasMustTail

bool clang::sema::FunctionScopeInfo::HasMustTail

Whether this function contains any statement marked with [[clang::musttail]].

Definition at line 127 of file ScopeInfo.h.

Referenced by NeedsScopeChecking(), and setHasMustTail().

◆ HasOMPDeclareReductionCombiner

bool clang::sema::FunctionScopeInfo::HasOMPDeclareReductionCombiner

True if current scope is for OpenMP declare reduction combiner.

Definition at line 133 of file ScopeInfo.h.

Referenced by Clear(), clang::Sema::DiagnoseUseOfDecl(), and setHasOMPDeclareReductionCombiner().

◆ HasPotentialAvailabilityViolations

bool clang::sema::FunctionScopeInfo::HasPotentialAvailabilityViolations

Whether we make reference to a declaration that could be unavailable.

Definition at line 143 of file ScopeInfo.h.

Referenced by clang::Sema::ActOnFinishFunctionBody(), and Clear().

◆ Kind

ScopeKind clang::sema::FunctionScopeInfo::Kind

◆ ModifiedNonNullParams

llvm::SmallPtrSet<const ParmVarDecl *, 8> clang::sema::FunctionScopeInfo::ModifiedNonNullParams

A list of parameters which have the nonnull attribute and are modified in the function.

Definition at line 237 of file ScopeInfo.h.

Referenced by Clear().

◆ NeedsCoroutineSuspends

bool clang::sema::FunctionScopeInfo::NeedsCoroutineSuspends

True only when this function has not already built, or attempted to build, the initial and final coroutine suspend points.

Definition at line 169 of file ScopeInfo.h.

Referenced by Clear(), hasInvalidCoroutineSuspends(), setCoroutineSuspends(), and setNeedsCoroutineSuspends().

◆ ObjCIsDesignatedInit

bool clang::sema::FunctionScopeInfo::ObjCIsDesignatedInit

True when this is a method marked as a designated initializer.

Definition at line 151 of file ScopeInfo.h.

Referenced by clang::Sema::ActOnStartOfObjCMethodDef(), clang::Sema::BuildInstanceMessage(), and Clear().

◆ ObjCIsSecondaryInit

bool clang::sema::FunctionScopeInfo::ObjCIsSecondaryInit

True when this is an initializer method not marked as a designated initializer within a class that has at least one initializer marked as a designated initializer.

Definition at line 161 of file ScopeInfo.h.

Referenced by clang::Sema::ActOnStartOfObjCMethodDef(), clang::Sema::BuildInstanceMessage(), and Clear().

◆ ObjCShouldCallSuper

bool clang::sema::FunctionScopeInfo::ObjCShouldCallSuper

A flag that is set when parsing a method that must call super's implementation, such as -dealloc, -finalize, or any method marked with __attribute__((objc_requires_super)).

Definition at line 148 of file ScopeInfo.h.

Referenced by clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnStartOfObjCMethodDef(), clang::Sema::ActOnSuperMessage(), and Clear().

◆ ObjCWarnForNoDesignatedInitChain

bool clang::sema::FunctionScopeInfo::ObjCWarnForNoDesignatedInitChain

This starts true for a method marked as designated initializer and will be set to false if there is an invocation to a designated initializer of the super class.

Definition at line 156 of file ScopeInfo.h.

Referenced by clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnStartOfObjCMethodDef(), clang::Sema::BuildInstanceMessage(), and Clear().

◆ ObjCWarnForNoInitDelegation

bool clang::sema::FunctionScopeInfo::ObjCWarnForNoInitDelegation

This starts true for a secondary initializer method and will be set to false if there is an invocation of an initializer on 'self'.

Definition at line 165 of file ScopeInfo.h.

Referenced by clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnStartOfObjCMethodDef(), clang::Sema::BuildInstanceMessage(), and Clear().

◆ PossiblyUnreachableDiags

SmallVector<PossiblyUnreachableDiag, 4> clang::sema::FunctionScopeInfo::PossiblyUnreachableDiags

A list of PartialDiagnostics created but delayed within the current function scope.

These diagnostics are vetted for reachability prior to being emitted.

Definition at line 233 of file ScopeInfo.h.

Referenced by Clear(), flushDiagnostics(), and clang::sema::AnalysisBasedWarnings::IssueWarnings().

◆ Returns

SmallVector<ReturnStmt*, 4> clang::sema::FunctionScopeInfo::Returns

The list of return statements that occur within the function or block, if there is any chance of applying the named return value optimization, or if we need to infer a return type.

Definition at line 208 of file ScopeInfo.h.

Referenced by Clear(), and clang::Sema::deduceClosureReturnType().

◆ SwitchStack

SmallVector<SwitchInfo, 8> clang::sema::FunctionScopeInfo::SwitchStack

◆ UsesFPIntrin

bool clang::sema::FunctionScopeInfo::UsesFPIntrin

Whether this function uses constrained floating point intrinsics.

Definition at line 139 of file ScopeInfo.h.

Referenced by clang::Sema::ActOnFinishFunctionBody(), Clear(), and setUsesFPIntrin().


The documentation for this class was generated from the following files: