clang API Documentation

clang::FunctionScopeInfo Struct Reference

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

#include <Sema.h>

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

List of all members.

Public Member Functions

bool NeedsScopeChecking () const
 FunctionScopeInfo (unsigned NumErrors)
virtual ~FunctionScopeInfo ()
void Clear (unsigned NumErrors)
 Clear out the information in this function scope, making it suitable for reuse.

Static Public Member Functions

static bool classof (const FunctionScopeInfo *FSI)

Public Attributes

bool IsBlockInfo
 Whether this scope information structure defined information for a block.
bool HasBranchProtectedScope
 Whether this function contains a VLA, , try, C++ initializer, or anything else that can't be jumped past.
bool HasBranchIntoScope
 Whether this function contains any switches or direct gotos.
bool HasIndirectGoto
 Whether this function contains any indirect gotos.
unsigned NumErrorsAtStartOfFunction
 The number of errors that had occurred before starting this function or block.
llvm::DenseMap< IdentifierInfo
*, LabelStmt * > 
LabelMap
llvm::SmallVector< SwitchStmt *, 8 > SwitchStack
llvm::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.

Detailed Description

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

Definition at line 129 of file Sema.h.


Constructor & Destructor Documentation

clang::FunctionScopeInfo::FunctionScopeInfo ( unsigned  NumErrors  )  [inline]

Definition at line 167 of file Sema.h.

FunctionScopeInfo::~FunctionScopeInfo (  )  [virtual]

Definition at line 34 of file Sema.cpp.


Member Function Documentation

static bool clang::FunctionScopeInfo::classof ( const FunctionScopeInfo FSI  )  [inline, static]

Reimplemented in clang::BlockScopeInfo.

Definition at line 180 of file Sema.h.

void FunctionScopeInfo::Clear ( unsigned  NumErrors  ) 

Clear out the information in this function scope, making it suitable for reuse.

Definition at line 36 of file Sema.cpp.

References HasBranchIntoScope, HasBranchProtectedScope, HasIndirectGoto, LabelMap, NumErrorsAtStartOfFunction, Returns, and SwitchStack.

Referenced by clang::Sema::PopFunctionOrBlockScope(), and clang::Sema::PushFunctionScope().

bool clang::FunctionScopeInfo::NeedsScopeChecking (  )  const [inline]

Definition at line 162 of file Sema.h.

References HasBranchIntoScope, HasBranchProtectedScope, and HasIndirectGoto.


Member Data Documentation

Whether this function contains any switches or direct gotos.

Definition at line 139 of file Sema.h.

Referenced by Clear(), and NeedsScopeChecking().

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

Definition at line 136 of file Sema.h.

Referenced by Clear(), and NeedsScopeChecking().

Whether this function contains any indirect gotos.

Definition at line 142 of file Sema.h.

Referenced by Clear(), and NeedsScopeChecking().

Whether this scope information structure defined information for a block.

Definition at line 132 of file Sema.h.

Referenced by clang::BlockScopeInfo::BlockScopeInfo(), and clang::BlockScopeInfo::classof().

LabelMap - This is a mapping from label identifiers to the LabelStmt for it (which acts like the label decl in some ways). Forward referenced labels have a LabelStmt created for them with a null location & SubStmt.

Definition at line 151 of file Sema.h.

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

The number of errors that had occurred before starting this function or block.

Definition at line 146 of file Sema.h.

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

The list of return statements that occur within the function or block, if there is any chance of applying the named return value optimization.

Definition at line 160 of file Sema.h.

Referenced by Clear().

SwitchStack - This is the current set of active switch statements in the block.

Definition at line 155 of file Sema.h.

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


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