clang API Documentation
Retains information about a function, method, or block that is currently being parsed. More...
#include <Sema.h>


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. | |
Retains information about a function, method, or block that is currently being parsed.
Definition at line 129 of file Sema.h.
| clang::FunctionScopeInfo::FunctionScopeInfo | ( | unsigned | NumErrors | ) | [inline] |
| static bool clang::FunctionScopeInfo::classof | ( | const FunctionScopeInfo * | FSI | ) | [inline, static] |
Reimplemented in clang::BlockScopeInfo.
| 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.
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().
| llvm::DenseMap<IdentifierInfo*, LabelStmt*> clang::FunctionScopeInfo::LabelMap |
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().
| llvm::SmallVector<ReturnStmt *, 4> clang::FunctionScopeInfo::Returns |
| llvm::SmallVector<SwitchStmt*, 8> clang::FunctionScopeInfo::SwitchStack |
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().