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

NameValueComment
FnScope1This indicates that the scope corresponds to a function, which means that labels are set here.
BreakScope2This is a while, do, switch, for, etc that can have break statements embedded into it.
ContinueScope4This is a while, do, for, which can have continue statements embedded into it.
DeclScope8This is a scope that can contain a declaration. Some scopes just contain loop constructs but don't contain decls.
ControlScope16The controlling scope in a if/switch/while/for statement.
ClassScope32The scope of a struct/union/class definition.
BlockScope64This 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.
TemplateParamScope128This 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.
FunctionPrototypeScope256This is a scope that corresponds to the parameters within a function prototype.
FunctionDeclarationScope512This 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.
AtCatchScope1024This is a scope that corresponds to the Objective-C @ catch statement.
ObjCMethodScope2048This scope corresponds to an Objective-C method body. It always has FnScope and DeclScope set as well.
SwitchScope4096This is a scope that corresponds to a switch statement.
TryScope8192This is the scope of a C++ try statement.
FnTryCatchScope16384This is the scope for a function-level C++ try or catch scope.
OpenMPDirectiveScope32768This is the scope of OpenMP executable directive.
OpenMPLoopDirectiveScope65536This is the scope of some OpenMP loop directive.
OpenMPSimdDirectiveScope131072This 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.
EnumScope262144This scope corresponds to an enum.
SEHTryScope524288This scope corresponds to an SEH try.
SEHExceptScope1048576This scope corresponds to an SEH except.
SEHFilterScope2097152We are currently in the filter expression of an SEH except block.
CompoundStmtScope4194304This is a compound statement scope.
ClassInheritanceScope8388608We are between inheritance colon and the real class/struct definition scope.
CatchScope16777216This is the scope of a C++ catch statement.
ConditionVarScope33554432This 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.