Lines Matching refs:Scope

1 //===--- Scope.h - Scope interface ------------------------------*- C++ -*-===//
10 // This file defines the Scope interface.
26 /// Scope - A scope is a transient data structure that is used while parsing the
30 class Scope {
99 Scope *AnyParent;
119 Scope *FnParent;
125 Scope *BreakParent, *ContinueParent;
129 Scope *BlockParent;
135 Scope *TemplateParamParent;
159 Scope(Scope *Parent, unsigned ScopeFlags, DiagnosticsEngine &Diag)
174 const Scope *getParent() const { return AnyParent; }
175 Scope *getParent() { return AnyParent; }
179 const Scope *getFnParent() const { return FnParent; }
180 Scope *getFnParent() { return FnParent; }
184 Scope *getContinueParent() {
188 const Scope *getContinueParent() const {
189 return const_cast<Scope*>(this)->getContinueParent();
194 Scope *getBreakParent() {
197 const Scope *getBreakParent() const {
198 return const_cast<Scope*>(this)->getBreakParent();
201 Scope *getBlockParent() { return BlockParent; }
202 const Scope *getBlockParent() const { return BlockParent; }
204 Scope *getTemplateParamParent() { return TemplateParamParent; }
205 const Scope *getTemplateParamParent() const { return TemplateParamParent; }
250 return (getFlags() & Scope::ClassScope);
256 if (const Scope *FnS = getFnParent()) {
266 for (const Scope *S = this; S; S = S->getParent()) {
277 return getFlags() & Scope::TemplateParamScope;
283 return getFlags() & Scope::FunctionPrototypeScope;
288 return getFlags() & Scope::AtCatchScope;
293 for (const Scope *S = this; S; S = S->getParent()) {
294 if (S->getFlags() & Scope::SwitchScope)
296 else if (S->getFlags() & (Scope::FnScope | Scope::ClassScope |
297 Scope::BlockScope | Scope::TemplateParamScope |
298 Scope::FunctionPrototypeScope |
299 Scope::AtCatchScope | Scope::ObjCMethodScope))
306 bool isTryScope() const { return getFlags() & Scope::TryScope; }
337 void Init(Scope *parent, unsigned flags);