|
clang 23.0.0git
|
Scope - A scope is a transient data structure that is used while parsing the program. More...
#include "clang/Sema/Scope.h"
Public Types | |
| enum | ScopeFlags { NoScope = 0 , FnScope = 0x01 , BreakScope = 0x02 , ContinueScope = 0x04 , DeclScope = 0x08 , ControlScope = 0x10 , ClassScope = 0x20 , BlockScope = 0x40 , TemplateParamScope = 0x80 , FunctionPrototypeScope = 0x100 , FunctionDeclarationScope = 0x200 , AtCatchScope = 0x400 , ObjCMethodScope = 0x800 , SwitchScope = 0x1000 , TryScope = 0x2000 , FnTryCatchScope = 0x4000 , OpenMPDirectiveScope = 0x8000 , OpenMPLoopDirectiveScope = 0x10000 , OpenMPSimdDirectiveScope = 0x20000 , EnumScope = 0x40000 , SEHTryScope = 0x80000 , SEHExceptScope = 0x100000 , SEHFilterScope = 0x200000 , CompoundStmtScope = 0x400000 , ClassInheritanceScope = 0x800000 , CatchScope = 0x1000000 , Unused = 0x2000000 , OpenMPOrderClauseScope = 0x4000000 , LambdaScope = 0x8000000 , OpenACCComputeConstructScope = 0x10000000 , OpenACCLoopConstructScope = 0x20000000 , TypeAliasScope = 0x40000000 , FriendScope = 0x80000000 } |
| ScopeFlags - These are bitfields that are or'd together when creating a scope, which defines the sorts of things the scope contains. More... | |
| using | decl_range = llvm::iterator_range<DeclSetTy::iterator> |
| using | using_directives_range |
Public Member Functions | |
| Scope (Scope *Parent, unsigned ScopeFlags, DiagnosticsEngine &Diag) | |
| unsigned | getFlags () const |
| getFlags - Return the flags for this scope. | |
| void | setFlags (unsigned F) |
| LabelDecl * | getPrecedingLabel () const |
| Get the label that precedes this scope. | |
| bool | isBlockScope () const |
| isBlockScope - Return true if this scope correspond to a closure. | |
| const Scope * | getParent () const |
| getParent - Return the scope that this is nested in. | |
| Scope * | getParent () |
| const Scope * | getFnParent () const |
| getFnParent - Return the closest scope that is a function body. | |
| Scope * | getFnParent () |
| const Scope * | getMSLastManglingParent () const |
| Scope * | getMSLastManglingParent () |
| Scope * | getContinueParent () |
| getContinueParent - Return the closest scope that a continue statement would be affected by. | |
| const Scope * | getContinueParent () const |
| Scope * | getBreakParent () |
| getBreakParent - Return the closest scope that a break statement would be affected by. | |
| const Scope * | getBreakParent () const |
| Scope * | getBlockParent () |
| const Scope * | getBlockParent () const |
| Scope * | getTemplateParamParent () |
| const Scope * | getTemplateParamParent () const |
| Scope * | getDeclParent () |
| const Scope * | getDeclParent () const |
| unsigned | getDepth () const |
| Returns the depth of this scope. The translation-unit has scope depth 0. | |
| unsigned | getFunctionPrototypeDepth () const |
| Returns the number of function prototype scopes in this scope chain. | |
| unsigned | getNextFunctionPrototypeIndex () |
| Return the number of parameters declared in this function prototype, increasing it by one for the next call. | |
| decl_range | decls () const |
| bool | decl_empty () const |
| void | AddDecl (Decl *D) |
| void | RemoveDecl (Decl *D) |
| void | incrementMSManglingNumber () |
| void | decrementMSManglingNumber () |
| unsigned | getMSLastManglingNumber () const |
| unsigned | getMSCurManglingNumber () const |
| bool | isDeclScope (const Decl *D) const |
| isDeclScope - Return true if this is the scope that the specified decl is declared in. | |
| DeclContext * | getEntity () const |
| Get the entity corresponding to this scope. | |
| DeclContext * | getLookupEntity () const |
| Get the DeclContext in which to continue unqualified lookup after a lookup in this scope. | |
| void | setEntity (DeclContext *E) |
| void | setLookupEntity (DeclContext *E) |
| bool | hasUnrecoverableErrorOccurred () const |
| Determine whether any unrecoverable errors have occurred within this scope. | |
| bool | isFunctionScope () const |
| isFunctionScope() - Return true if this scope is a function scope. | |
| bool | isClassScope () const |
| isClassScope - Return true if this scope is a class/struct/union scope. | |
| bool | isClassInheritanceScope () const |
| Determines whether this scope is between inheritance colon and the real class/struct definition. | |
| bool | isInCXXInlineMethodScope () const |
| isInCXXInlineMethodScope - Return true if this scope is a C++ inline method scope or is inside one. | |
| bool | isInCFunctionScope () const |
| isInObjcMethodScope - Return true if this scope is, or is contained, in an C function body. | |
| bool | isInObjcMethodScope () const |
| isInObjcMethodScope - Return true if this scope is, or is contained in, an Objective-C method body. | |
| bool | isInObjcMethodOuterScope () const |
| isInObjcMethodOuterScope - Return true if this scope is an Objective-C method outer most body. | |
| bool | isTemplateParamScope () const |
| isTemplateParamScope - Return true if this scope is a C++ template parameter scope. | |
| bool | isFunctionPrototypeScope () const |
| isFunctionPrototypeScope - Return true if this scope is a function prototype scope. | |
| bool | isFunctionDeclarationScope () const |
| isFunctionDeclarationScope - Return true if this scope is a function prototype scope. | |
| bool | isAtCatchScope () const |
| isAtCatchScope - Return true if this scope is @catch. | |
| bool | isCatchScope () const |
| isCatchScope - Return true if this scope is a C++ catch statement. | |
| bool | isSwitchScope () const |
| isSwitchScope - Return true if this scope is a switch scope. | |
| bool | isLoopScope () const |
| Return true if this scope is a loop. | |
| bool | isOpenMPDirectiveScope () const |
| Determines whether this scope is the OpenMP directive scope. | |
| bool | isOpenMPLoopDirectiveScope () const |
| Determine whether this scope is some OpenMP loop directive scope (for example, 'omp for', 'omp simd'). | |
| bool | isOpenMPSimdDirectiveScope () const |
| Determine whether this scope is (or is nested into) some OpenMP loop simd directive scope (for example, 'omp simd', 'omp for simd'). | |
| bool | isOpenMPLoopScope () const |
| Determine whether this scope is a loop having OpenMP loop directive attached. | |
| bool | isOpenMPOrderClauseScope () const |
| Determine whether this scope is some OpenMP directive with order clause which specifies concurrent scope. | |
| bool | isOpenACCComputeConstructScope () const |
| Determine whether this scope is the statement associated with an OpenACC Compute construct directive. | |
| bool | isOpenACCLoopConstructScope () const |
| bool | isInOpenACCComputeConstructScope (ScopeFlags Flags=NoScope) const |
| Determine if this scope (or its parents) are a compute construct. | |
| bool | isContinueScope () const |
| Determine whether this scope is a while/do/for statement, which can have continue statements embedded into it. | |
| bool | isBreakOrContinueScope () const |
| Determine whether this is a scope which can have 'break' or 'continue' statements embedded into it. | |
| bool | isTryScope () const |
| Determine whether this scope is a C++ 'try' block. | |
| bool | isFnTryCatchScope () const |
| Determine whether this scope is a function-level C++ try or catch scope. | |
| bool | isSEHTryScope () const |
| Determine whether this scope is a SEH '__try' block. | |
| bool | isSEHExceptScope () const |
| Determine whether this scope is a SEH '__except' block. | |
| bool | isCompoundStmtScope () const |
| Determine whether this scope is a compound statement scope. | |
| bool | isControlScope () const |
| Determine whether this scope is a controlling scope in a if/switch/while/for statement. | |
| bool | isTypeAliasScope () const |
| Determine whether this scope is a type alias scope. | |
| bool | isFriendScope () const |
| Determine whether this scope is a friend scope. | |
| bool | Contains (const Scope &rhs) const |
| Returns if rhs has a higher scope depth than this. | |
| void | EnterLoopBody (LabelDecl *PrecedingLabel) |
| Mark that we're entering the body of a loop (for, while, do). | |
| void | EnterSwitchBody (LabelDecl *PrecedingLabel) |
| Mark that we're entering the body of a switch statement. | |
| void | LeaveLoopBody () |
| Mark that we're leaving the body of a loop; this is only needed for do loops where the condition follows the loop body. | |
| bool | containedInPrototypeScope () const |
| containedInPrototypeScope - Return true if this or a parent scope is a FunctionPrototypeScope. | |
| void | PushUsingDirective (UsingDirectiveDecl *UDir) |
| using_directives_range | using_directives () |
| void | updateNRVOCandidate (VarDecl *VD) |
| void | applyNRVO () |
| void | Init (Scope *parent, unsigned flags) |
| Init - This is used by the parser to implement scope caching. | |
| void | dumpImpl (raw_ostream &OS) const |
| void | dump () const |
Scope - A scope is a transient data structure that is used while parsing the program.
It assists with resolving identifiers to the appropriate declaration.
| using clang::Scope::decl_range = llvm::iterator_range<DeclSetTy::iterator> |
ScopeFlags - These are bitfields that are or'd together when creating a scope, which defines the sorts of things the scope contains.
| Enumerator | |
|---|---|
| NoScope | |
| FnScope | This indicates that the scope corresponds to a function, which means that labels are set here. |
| BreakScope | This is a while, do, switch, for, etc that can have break statements embedded into it. |
| ContinueScope | This is a while, do, for, which can have continue statements embedded into it. |
| DeclScope | This is a scope that can contain a declaration. Some scopes just contain loop constructs but don't contain decls. |
| ControlScope | The controlling scope in a if/switch/while/for statement. |
| ClassScope | The scope of a struct/union/class definition. |
| BlockScope | 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 | 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 | This is a scope that corresponds to the parameters within a function prototype. |
| FunctionDeclarationScope | 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 | This is a scope that corresponds to the Objective-C @catch statement. |
| ObjCMethodScope | This scope corresponds to an Objective-C method body. It always has FnScope and DeclScope set as well. |
| SwitchScope | This is a scope that corresponds to a switch statement. |
| TryScope | This is the scope of a C++ try statement. |
| FnTryCatchScope | This is the scope for a function-level C++ try or catch scope. |
| OpenMPDirectiveScope | This is the scope of OpenMP executable directive. |
| OpenMPLoopDirectiveScope | This is the scope of some OpenMP loop directive. |
| OpenMPSimdDirectiveScope | 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 | This scope corresponds to an enum. |
| SEHTryScope | This scope corresponds to an SEH try. |
| SEHExceptScope | This scope corresponds to an SEH except. |
| SEHFilterScope | We are currently in the filter expression of an SEH except block. |
| CompoundStmtScope | This is a compound statement scope. |
| ClassInheritanceScope | We are between inheritance colon and the real class/struct definition scope. |
| CatchScope | This is the scope of a C++ catch statement. |
| Unused | This bit is currently unused. |
| OpenMPOrderClauseScope | This is a scope of some OpenMP directive with order clause which specifies concurrent. |
| LambdaScope | This is the scope for a lambda, after the lambda introducer. Lambdas need two FunctionPrototypeScope scopes (because there is a template scope in between), the outer scope does not increase the depth of recursion. |
| OpenACCComputeConstructScope | This is the scope of an OpenACC Compute Construct, which restricts jumping into/out of it. We also use this to represent 'combined' constructs, since they have the same behavior. |
| OpenACCLoopConstructScope | This is the scope of an OpenACC Loop/Combined construct, which is used to determine whether a 'cache' construct variable reference is legal. |
| TypeAliasScope | This is a scope of type alias declaration. |
| FriendScope | This is a scope of friend declaration. |
|
inline |
Definition at line 263 of file Scope.h.
References Diag(), clang::Init, and Scope().
Referenced by CollectARMPACBTIOptions(), containedInPrototypeScope(), Contains(), decrementMSManglingNumber(), dumpImpl(), getBlockParent(), getBlockParent(), getBreakParent(), getBreakParent(), getContinueParent(), getContinueParent(), getDeclParent(), getDeclParent(), getFnParent(), getFnParent(), getMSLastManglingNumber(), getMSLastManglingParent(), getMSLastManglingParent(), getParent(), getParent(), getTemplateParamParent(), getTemplateParamParent(), incrementMSManglingNumber(), Init(), isInCFunctionScope(), isInCXXInlineMethodScope(), isInObjcMethodOuterScope(), isInObjcMethodScope(), isInOpenACCComputeConstructScope(), isOpenMPLoopScope(), isSwitchScope(), Scope(), and updateNRVOCandidate().
|
inline |
Definition at line 344 of file Scope.h.
References clang::isa().
Referenced by clang::Sema::ActOnDecompositionDeclarator(), clang::Sema::ActOnDelayedCXXMethodParameter(), clang::SemaObjC::ActOnIvar(), clang::SemaObjC::ActOnMethodParmDeclaration(), clang::Sema::ActOnNonTypeTemplateParameter(), clang::SemaObjC::ActOnObjCExceptionDecl(), clang::Sema::ActOnParamDeclarator(), clang::Sema::ActOnReenterCXXMethodParameter(), clang::Sema::ActOnReenterFunctionContext(), clang::Sema::ActOnReenterTemplateScope(), clang::Sema::ActOnTemplateTemplateParameter(), clang::Sema::ActOnTypeParameter(), and clang::Sema::PushOnScopeChains().
| void Scope::applyNRVO | ( | ) |
Definition at line 171 of file Scope.cpp.
References getEntity(), getParent(), isDeclScope(), and clang::VarDecl::setNRVOVariable().
Referenced by clang::Sema::ActOnPopScope().
| bool Scope::containedInPrototypeScope | ( | ) | const |
containedInPrototypeScope - Return true if this or a parent scope is a FunctionPrototypeScope.
Definition at line 106 of file Scope.cpp.
References getParent(), isFunctionPrototypeScope(), and Scope().
Referenced by clang::Sema::ActOnTag().
Returns if rhs has a higher scope depth than this.
The caller is responsible for calling this only if one of the two scopes is an ancestor of the other.
Definition at line 619 of file Scope.h.
References Scope().
Referenced by clang::Sema::BuildResolvedCallExpr(), and CheckJumpOutOfSEHFinallyOrDefer().
|
inline |
Definition at line 342 of file Scope.h.
Referenced by clang::Sema::ActOnPopScope().
|
inline |
Definition at line 338 of file Scope.h.
Referenced by clang::Sema::ActOnLambdaExpressionAfterIntroducer(), clang::Sema::ActOnPopScope(), and clang::SemaCodeCompletion::CodeCompleteLambdaIntroducer().
|
inline |
Definition at line 361 of file Scope.h.
References getMSLastManglingParent(), and Scope().
| LLVM_DUMP_METHOD void Scope::dump | ( | ) | const |
Definition at line 202 of file Scope.cpp.
References dumpImpl().
| void Scope::dumpImpl | ( | raw_ostream & | OS | ) | const |
Definition at line 204 of file Scope.cpp.
References AtCatchScope, BlockScope, BreakScope, CatchScope, ClassInheritanceScope, ClassScope, CompoundStmtScope, ContinueScope, ControlScope, DeclScope, EnumScope, FnScope, FnTryCatchScope, FriendScope, FunctionDeclarationScope, FunctionPrototypeScope, getEntity(), getFlags(), getMSCurManglingNumber(), getMSLastManglingNumber(), getParent(), LambdaScope, ObjCMethodScope, OpenACCComputeConstructScope, OpenACCLoopConstructScope, OpenMPDirectiveScope, OpenMPLoopDirectiveScope, OpenMPOrderClauseScope, OpenMPSimdDirectiveScope, Scope(), SEHExceptScope, SEHFilterScope, SEHTryScope, SwitchScope, TemplateParamScope, TryScope, TypeAliasScope, and Unused.
Referenced by dump().
| void Scope::EnterLoopBody | ( | LabelDecl * | PrecedingLabel | ) |
Mark that we're entering the body of a loop (for, while, do).
Definition at line 116 of file Scope.cpp.
References BreakScope, and ContinueScope.
| void Scope::EnterSwitchBody | ( | LabelDecl * | PrecedingLabel | ) |
Mark that we're entering the body of a switch statement.
Definition at line 122 of file Scope.cpp.
References BreakScope.
|
inline |
|
inline |
|
inline |
getBreakParent - Return the closest scope that a break statement would be affected by.
Definition at line 304 of file Scope.h.
References Scope().
Referenced by clang::Sema::ActOnBreakStmt(), clang::SemaOpenMP::ActOnOpenMPScanDirective(), AddKeywordsToConsumer(), AddOrdinaryNameResults(), and getBreakParent().
|
inline |
Definition at line 307 of file Scope.h.
References getBreakParent(), and Scope().
|
inline |
getContinueParent - Return the closest scope that a continue statement would be affected by.
Definition at line 294 of file Scope.h.
References Scope().
Referenced by clang::Sema::ActOnContinueStmt(), AddKeywordsToConsumer(), AddOrdinaryNameResults(), and getContinueParent().
|
inline |
Definition at line 298 of file Scope.h.
References getContinueParent(), and Scope().
|
inline |
Definition at line 317 of file Scope.h.
References Scope().
Referenced by clang::Sema::ActOnAliasDeclaration(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnUsingDirective(), clang::Sema::CheckTemplateDeclScope(), and clang::Sema::HandleDeclarator().
|
inline |
|
inline |
Returns the depth of this scope. The translation-unit has scope depth 0.
Definition at line 321 of file Scope.h.
Referenced by clang::Sema::ActOnCXXForRangeStmt(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::BuildCXXForRangeStmt(), and clang::SemaOpenACC::CheckDeclReference().
|
inline |
Get the entity corresponding to this scope.
Definition at line 383 of file Scope.h.
References isTemplateParamScope(), and clang::nullptr.
Referenced by clang::Sema::ActOnLambdaExpressionAfterIntroducer(), applyNRVO(), clang::Sema::CheckTemplateDeclScope(), clang::SemaCodeCompletion::CodeCompleteNamespaceDecl(), clang::SemaCodeCompletion::CodeCompleteObjCMethodDecl(), clang::SemaCodeCompletion::CodeCompleteQualifiedId(), dumpImpl(), clang::Sema::EnterDeclaratorContext(), clang::Sema::ExitDeclaratorContext(), clang::Sema::getDestructorName(), clang::Sema::getNonFieldDeclScope(), clang::Sema::getScopeForDeclContext(), getTagInjectionScope(), clang::Sema::ImplicitlyDefineFunction(), clang::IdentifierResolver::isDeclInScope(), isNamespaceOrTranslationUnitScope(), isNamespaceScope(), clang::Sema::LookupName(), clang::Sema::PushOnScopeChains(), and clang::Sema::PushUsingDirective().
|
inline |
getFlags - Return the flags for this scope.
Definition at line 269 of file Scope.h.
Referenced by clang::Sema::ActOnCXXThrow(), clang::Sema::ActOnPopScope(), clang::Sema::ActOnUsingDeclaration(), BuiltinSEHScopeCheck(), clang::Sema::CheckClassTemplate(), clang::SemaCodeCompletion::CodeCompleteDeclSpec(), dumpImpl(), clang::Sema::getNonFieldDeclScope(), getTagInjectionScope(), handleDependencyAttr(), isAtCatchScope(), isBreakOrContinueScope(), isCatchScope(), isClassInheritanceScope(), isClassScope(), isCompoundStmtScope(), isContinueScope(), isControlScope(), isFnTryCatchScope(), isFriendScope(), isFunctionDeclarationScope(), isFunctionPrototypeScope(), isFunctionScope(), IsInFnTryBlockHandler(), isLoopScope(), isOpenACCComputeConstructScope(), isOpenACCLoopConstructScope(), isOpenMPDirectiveScope(), isOpenMPLoopDirectiveScope(), isOpenMPOrderClauseScope(), isOpenMPSimdDirectiveScope(), isSEHExceptScope(), isSEHTryScope(), isTemplateParamScope(), isTryScope(), isTypeAliasScope(), and clang::Sema::LookupName().
|
inline |
|
inline |
getFnParent - Return the closest scope that is a function body.
Definition at line 284 of file Scope.h.
References Scope().
Referenced by clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::CheckTypedefForVariablyModifiedType(), clang::SemaCodeCompletion::CodeCompleteAfterIf(), clang::SemaCodeCompletion::CodeCompleteExpression(), clang::SemaCodeCompletion::CodeCompleteInPreprocessorConditionalExclusion(), clang::SemaCodeCompletion::CodeCompleteOrdinaryName(), isInCXXInlineMethodScope(), IsInFnTryBlockHandler(), clang::Sema::LookupOrCreateLabel(), and clang::Sema::PushOnScopeChains().
|
inline |
Returns the number of function prototype scopes in this scope chain.
Definition at line 325 of file Scope.h.
Referenced by clang::Sema::ActOnParamDeclarator().
|
inline |
Get the DeclContext in which to continue unqualified lookup after a lookup in this scope.
|
inline |
Definition at line 374 of file Scope.h.
Referenced by dumpImpl(), and getMSManglingNumber().
|
inline |
Definition at line 368 of file Scope.h.
References getMSLastManglingParent(), and Scope().
Referenced by dumpImpl(), and getMSManglingNumber().
|
inline |
|
inline |
Definition at line 287 of file Scope.h.
References Scope().
Referenced by decrementMSManglingNumber(), getMSLastManglingNumber(), and incrementMSManglingNumber().
|
inline |
Return the number of parameters declared in this function prototype, increasing it by one for the next call.
Definition at line 331 of file Scope.h.
References isFunctionPrototypeScope().
Referenced by clang::Sema::ActOnParamDeclarator().
|
inline |
|
inline |
getParent - Return the scope that this is nested in.
Definition at line 280 of file Scope.h.
References Scope().
Referenced by clang::Sema::ActOnBreakStmt(), clang::Sema::ActOnCXXThrow(), clang::Sema::ActOnFields(), clang::Sema::ActOnLambdaExpressionAfterIntroducer(), clang::SemaObjC::ActOnObjCAtThrowStmt(), clang::SemaOpenMP::ActOnOpenMPScanDirective(), clang::Sema::ActOnSEHLeaveStmt(), clang::Sema::ActOnStartNamespaceDef(), clang::Sema::ActOnStartOfFunctionDef(), clang::Sema::ActOnSuperScopeSpecifier(), AddRecordMembersCompletionResults(), applyNRVO(), buildDeclareReductionRef(), buildUserDefinedMapperRef(), BuiltinSEHScopeCheck(), CheckAccess(), clang::Sema::CheckClassTemplate(), clang::SemaOpenACC::CheckDeclReference(), clang::SemaCodeCompletion::CodeCompleteLambdaIntroducer(), clang::SemaCodeCompletion::CodeCompleteNamespaceDecl(), containedInPrototypeScope(), dumpImpl(), clang::Sema::EnterDeclaratorContext(), clang::Sema::EnterTemplatedContext(), clang::Sema::ExitDeclaratorContext(), clang::Parser::ExitScope(), FindLabeledBreakContinueScope(), findOuterContext(), clang::Sema::getNonFieldDeclScope(), clang::Sema::getScopeForDeclContext(), getTagInjectionScope(), clang::Sema::getTemplateDepth(), hasUserDefinedMapper(), clang::Sema::ImplicitlyDefineFunction(), clang::IdentifierResolver::isDeclInScope(), IsInFnTryBlockHandler(), isOpenMPLoopScope(), isWithinCatchScope(), LeaveLoopBody(), clang::Sema::LookupName(), clang::Sema::PushOnScopeChains(), and setFlags().
|
inline |
Get the label that precedes this scope.
Definition at line 274 of file Scope.h.
Referenced by FindLabeledBreakContinueScope().
|
inline |
Definition at line 314 of file Scope.h.
References Scope().
Referenced by clang::Sema::ActOnTemplateName(), clang::Sema::ActOnTypenameType(), clang::Sema::ActOnTypenameType(), clang::Sema::getTemplateDepth(), clang::Sema::HandleDeclarator(), and clang::Sema::isTemplateName().
|
inline |
|
inline |
Determine whether any unrecoverable errors have occurred within this scope.
Note that this may return false even if the scope contains invalid declarations or statements, if the errors for those invalid constructs were suppressed because some prior invalid construct was referenced.
Definition at line 402 of file Scope.h.
Referenced by clang::Sema::ActOnPopScope(), and clang::SemaObjC::DiagnoseUnusedBackingIvarInAccessor().
|
inline |
Definition at line 354 of file Scope.h.
References getMSLastManglingParent(), and Scope().
Init - This is used by the parser to implement scope caching.
Definition at line 95 of file Scope.cpp.
References Scope().
Referenced by clang::Parser::EnterScope().
|
inline |
isAtCatchScope - Return true if this scope is @catch.
Definition at line 480 of file Scope.h.
References AtCatchScope, and getFlags().
Referenced by clang::SemaObjC::ActOnObjCAtThrowStmt().
|
inline |
isBlockScope - Return true if this scope correspond to a closure.
Definition at line 277 of file Scope.h.
References BlockScope.
|
inline |
Determine whether this is a scope which can have 'break' or 'continue' statements embedded into it.
Definition at line 582 of file Scope.h.
References BreakScope, ContinueScope, and getFlags().
Referenced by FindLabeledBreakContinueScope().
|
inline |
isCatchScope - Return true if this scope is a C++ catch statement.
Definition at line 485 of file Scope.h.
References CatchScope, and getFlags().
Referenced by isWithinCatchScope().
|
inline |
Determines whether this scope is between inheritance colon and the real class/struct definition.
Definition at line 414 of file Scope.h.
References ClassInheritanceScope, and getFlags().
Referenced by AddOrdinaryNameResults().
|
inline |
isClassScope - Return true if this scope is a class/struct/union scope.
Definition at line 410 of file Scope.h.
References ClassScope, and getFlags().
Referenced by clang::Sema::ActOnIdExpression(), AddKeywordsToConsumer(), clang::SemaCodeCompletion::CodeCompleteUsing(), clang::Sema::getNonFieldDeclScope(), and getTagInjectionScope().
|
inline |
Determine whether this scope is a compound statement scope.
Definition at line 601 of file Scope.h.
References CompoundStmtScope, and getFlags().
Referenced by clang::Sema::ImplicitlyDefineFunction().
|
inline |
Determine whether this scope is a while/do/for statement, which can have continue statements embedded into it.
Definition at line 576 of file Scope.h.
References ContinueScope, and getFlags().
|
inline |
Determine whether this scope is a controlling scope in a if/switch/while/for statement.
Definition at line 607 of file Scope.h.
References ControlScope, and getFlags().
Referenced by clang::IdentifierResolver::isDeclInScope().
isDeclScope - Return true if this is the scope that the specified decl is declared in.
Definition at line 380 of file Scope.h.
Referenced by clang::Sema::ActOnCXXThrow(), clang::Sema::ActOnExceptionDeclarator(), clang::SemaObjC::ActOnMethodParmDeclaration(), clang::Sema::ActOnParamDeclarator(), clang::Sema::ActOnTag(), applyNRVO(), buildDeclareReductionRef(), buildUserDefinedMapperRef(), clang::SemaOpenACC::CheckDeclReference(), clang::Sema::CleanupMergedEnum(), hasUserDefinedMapper(), clang::IdentifierResolver::isDeclInScope(), clang::Sema::LookupName(), and clang::Sema::PushOnScopeChains().
|
inline |
Determine whether this scope is a function-level C++ try or catch scope.
Definition at line 590 of file Scope.h.
References FnTryCatchScope, and getFlags().
Referenced by clang::IdentifierResolver::isDeclInScope(), and IsInFnTryBlockHandler().
|
inline |
Determine whether this scope is a friend scope.
Definition at line 613 of file Scope.h.
References FriendScope, and getFlags().
Referenced by CheckAccess().
|
inline |
isFunctionDeclarationScope - Return true if this scope is a function prototype scope.
Definition at line 475 of file Scope.h.
References FunctionDeclarationScope, and getFlags().
Referenced by clang::Sema::ActOnLambdaExpressionAfterIntroducer(), and GetDeclSpecTypeForDeclarator().
|
inline |
isFunctionPrototypeScope - Return true if this scope is a function prototype scope.
Definition at line 469 of file Scope.h.
References FunctionPrototypeScope, and getFlags().
Referenced by clang::Sema::ActOnParamDeclarator(), clang::Sema::BuildCompoundLiteralExpr(), containedInPrototypeScope(), getNextFunctionPrototypeIndex(), getTagInjectionScope(), clang::IdentifierResolver::isDeclInScope(), and clang::Sema::isMicrosoftMissingTypename().
|
inline |
isFunctionScope() - Return true if this scope is a function scope.
Definition at line 407 of file Scope.h.
References FnScope, and getFlags().
Referenced by FindLabeledBreakContinueScope(), clang::IdentifierResolver::isDeclInScope(), and isWithinCatchScope().
|
inline |
isInObjcMethodScope - Return true if this scope is, or is contained, in an C function body.
Definition at line 430 of file Scope.h.
References Scope().
Referenced by clang::Sema::BuildCompoundLiteralExpr().
|
inline |
isInCXXInlineMethodScope - Return true if this scope is a C++ inline method scope or is inside one.
Definition at line 420 of file Scope.h.
References getFnParent(), and Scope().
|
inline |
isInObjcMethodOuterScope - Return true if this scope is an Objective-C method outer most body.
Definition at line 452 of file Scope.h.
References ObjCMethodScope, and Scope().
|
inline |
isInObjcMethodScope - Return true if this scope is, or is contained in, an Objective-C method body.
Note that this method is not constant time.
Definition at line 441 of file Scope.h.
References ObjCMethodScope, and Scope().
Referenced by clang::SemaObjC::getObjCMessageKind().
|
inline |
Determine if this scope (or its parents) are a compute construct.
If the argument is provided, the search will stop at any of the specified scopes. Otherwise, it will stop only at the normal 'no longer search' scopes.
Definition at line 557 of file Scope.h.
References AtCatchScope, BlockScope, ClassScope, FnScope, FunctionPrototypeScope, NoScope, ObjCMethodScope, Scope(), and TemplateParamScope.
|
inline |
Return true if this scope is a loop.
Definition at line 502 of file Scope.h.
References BreakScope, getFlags(), and SwitchScope.
Referenced by clang::Sema::ActOnBreakStmt().
|
inline |
Determine whether this scope is the statement associated with an OpenACC Compute construct directive.
Definition at line 546 of file Scope.h.
References getFlags(), and OpenACCComputeConstructScope.
Referenced by clang::Sema::ActOnBreakStmt(), clang::Sema::ActOnContinueStmt(), and FindLabeledBreakContinueScope().
|
inline |
Definition at line 550 of file Scope.h.
References getFlags(), and OpenACCLoopConstructScope.
Referenced by clang::SemaOpenACC::CheckDeclReference().
|
inline |
Determines whether this scope is the OpenMP directive scope.
Definition at line 510 of file Scope.h.
References getFlags(), and OpenMPDirectiveScope.
Referenced by isOpenMPLoopDirectiveScope().
|
inline |
Determine whether this scope is some OpenMP loop directive scope (for example, 'omp for', 'omp simd').
Definition at line 516 of file Scope.h.
References getFlags(), isOpenMPDirectiveScope(), and OpenMPLoopDirectiveScope.
Referenced by isOpenMPLoopScope().
|
inline |
Determine whether this scope is a loop having OpenMP loop directive attached.
Definition at line 533 of file Scope.h.
References getParent(), isOpenMPLoopDirectiveScope(), and Scope().
Referenced by clang::Sema::ActOnBreakStmt(), and clang::SemaOpenMP::ActOnOpenMPScanDirective().
|
inline |
Determine whether this scope is some OpenMP directive with order clause which specifies concurrent scope.
Definition at line 540 of file Scope.h.
References getFlags(), and OpenMPOrderClauseScope.
Referenced by clang::SemaOpenMP::ActOnOpenMPCall().
|
inline |
Determine whether this scope is (or is nested into) some OpenMP loop simd directive scope (for example, 'omp simd', 'omp for simd').
Definition at line 527 of file Scope.h.
References getFlags(), and OpenMPSimdDirectiveScope.
|
inline |
Determine whether this scope is a SEH '__except' block.
Definition at line 598 of file Scope.h.
References getFlags(), and SEHExceptScope.
Referenced by BuiltinSEHScopeCheck().
|
inline |
Determine whether this scope is a SEH '__try' block.
Definition at line 595 of file Scope.h.
References getFlags(), and SEHTryScope.
Referenced by clang::Sema::ActOnSEHLeaveStmt().
|
inline |
isSwitchScope - Return true if this scope is a switch scope.
Definition at line 488 of file Scope.h.
References AtCatchScope, BlockScope, ClassScope, FnScope, FunctionPrototypeScope, ObjCMethodScope, Scope(), SwitchScope, and TemplateParamScope.
|
inline |
isTemplateParamScope - Return true if this scope is a C++ template parameter scope.
Definition at line 463 of file Scope.h.
References getFlags(), and TemplateParamScope.
Referenced by clang::Sema::ActOnClassTemplateSpecialization(), clang::Sema::ActOnFields(), clang::Sema::ActOnNonTypeTemplateParameter(), clang::Sema::ActOnTemplateTemplateParameter(), clang::Sema::ActOnTypeParameter(), clang::Sema::CheckClassTemplate(), clang::Sema::EnterDeclaratorContext(), clang::Sema::EnterTemplatedContext(), getEntity(), and setEntity().
|
inline |
Determine whether this scope is a C++ 'try' block.
Definition at line 587 of file Scope.h.
References getFlags(), and TryScope.
|
inline |
Determine whether this scope is a type alias scope.
Definition at line 610 of file Scope.h.
References getFlags(), and TypeAliasScope.
Referenced by clang::Sema::ActOnFields().
| void Scope::LeaveLoopBody | ( | ) |
Mark that we're leaving the body of a loop; this is only needed for do loops where the condition follows the loop body.
Definition at line 128 of file Scope.cpp.
References BreakScope, ContinueScope, and getParent().
|
inline |
Definition at line 635 of file Scope.h.
Referenced by clang::Sema::PushUsingDirective().
|
inline |
Definition at line 352 of file Scope.h.
Referenced by clang::Sema::CleanupMergedEnum(), clang::Sema::HideUsingShadowDecl(), clang::SemaObjC::popObjCTypeParamList(), and clang::Sema::PushOnScopeChains().
|
inline |
Definition at line 391 of file Scope.h.
References isTemplateParamScope().
Referenced by clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnReenterFunctionContext(), clang::Sema::ActOnTagStartSkippedDefinition(), clang::Sema::EnterDeclaratorContext(), and clang::Sema::PushDeclContext().
|
inline |
Definition at line 271 of file Scope.h.
References getParent(), and setFlags().
Referenced by setFlags().
|
inline |
Definition at line 396 of file Scope.h.
Referenced by clang::Sema::EnterTemplatedContext().
| void Scope::updateNRVOCandidate | ( | VarDecl * | VD | ) |
|
inline |