enum Scope::ScopeFlags
Description
ScopeFlags - These are bitfields that are or'd together when creating a scope, which defines the sorts of things the scope contains.
Declared at: clang/include/clang/Sema/Scope.h:44
Enumerators
Name | Value | Comment |
---|---|---|
FnScope | 1 | This indicates that the scope corresponds to a function, which means that labels are set here. |
BreakScope | 2 | This is a while, do, switch, for, etc that can have break statements embedded into it. |
ContinueScope | 4 | This is a while, do, for, which can have continue statements embedded into it. |
DeclScope | 8 | This is a scope that can contain a declaration. Some scopes just contain loop constructs but don't contain decls. |
ControlScope | 16 | The controlling scope in a if/switch/while/for statement. |
ClassScope | 32 | The scope of a struct/union/class definition. |
BlockScope | 64 | This is a scope that corresponds to a block/closure object. Blocks serve as top-level scopes for some objects like labels, they also prevent things like break and continue. BlockScopes always have the FnScope and DeclScope flags set as well. |
TemplateParamScope | 128 | This is a scope that corresponds to the template parameters of a C++ template. Template parameter scope starts at the 'template' keyword and ends when the template declaration ends. |
FunctionPrototypeScope | 256 | This is a scope that corresponds to the parameters within a function prototype. |
FunctionDeclarationScope | 512 | This is a scope that corresponds to the parameters within a function prototype for a function declaration (as opposed to any other kind of function declarator). Always has FunctionPrototypeScope set as well. |
AtCatchScope | 1024 | This is a scope that corresponds to the Objective-C @ catch statement. |
ObjCMethodScope | 2048 | This scope corresponds to an Objective-C method body. It always has FnScope and DeclScope set as well. |
SwitchScope | 4096 | This is a scope that corresponds to a switch statement. |
TryScope | 8192 | This is the scope of a C++ try statement. |
FnTryCatchScope | 16384 | This is the scope for a function-level C++ try or catch scope. |
OpenMPDirectiveScope | 32768 | This is the scope of OpenMP executable directive. |
OpenMPLoopDirectiveScope | 65536 | This is the scope of some OpenMP loop directive. |
OpenMPSimdDirectiveScope | 131072 | This is the scope of some OpenMP simd directive. For example, it is used for 'omp simd', 'omp for simd'. This flag is propagated to children scopes. |
EnumScope | 262144 | This scope corresponds to an enum. |
SEHTryScope | 524288 | This scope corresponds to an SEH try. |
SEHExceptScope | 1048576 | This scope corresponds to an SEH except. |
SEHFilterScope | 2097152 | We are currently in the filter expression of an SEH except block. |
CompoundStmtScope | 4194304 | This is a compound statement scope. |
ClassInheritanceScope | 8388608 | We are between inheritance colon and the real class/struct definition scope. |
CatchScope | 16777216 | This is the scope of a C++ catch statement. |
ConditionVarScope | 33554432 | This is a scope in which a condition variable is currently being parsed. If such a scope is a ContinueScope, it's invalid to jump to the continue block from here. |