clang  3.9.0
Scope.h
Go to the documentation of this file.
1 //===--- Scope.h - Scope interface ------------------------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file defines the Scope interface.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_CLANG_SEMA_SCOPE_H
15 #define LLVM_CLANG_SEMA_SCOPE_H
16 
17 #include "clang/AST/Decl.h"
18 #include "clang/Basic/Diagnostic.h"
19 #include "llvm/ADT/PointerIntPair.h"
20 #include "llvm/ADT/SmallPtrSet.h"
21 #include "llvm/ADT/SmallVector.h"
22 
23 namespace llvm {
24 
25 class raw_ostream;
26 
27 }
28 
29 namespace clang {
30 
31 class Decl;
32 class UsingDirectiveDecl;
33 class VarDecl;
34 
35 /// Scope - A scope is a transient data structure that is used while parsing the
36 /// program. It assists with resolving identifiers to the appropriate
37 /// declaration.
38 ///
39 class Scope {
40 public:
41  /// ScopeFlags - These are bitfields that are or'd together when creating a
42  /// scope, which defines the sorts of things the scope contains.
43  enum ScopeFlags {
44  /// \brief This indicates that the scope corresponds to a function, which
45  /// means that labels are set here.
46  FnScope = 0x01,
47 
48  /// \brief This is a while, do, switch, for, etc that can have break
49  /// statements embedded into it.
50  BreakScope = 0x02,
51 
52  /// \brief This is a while, do, for, which can have continue statements
53  /// embedded into it.
54  ContinueScope = 0x04,
55 
56  /// \brief This is a scope that can contain a declaration. Some scopes
57  /// just contain loop constructs but don't contain decls.
58  DeclScope = 0x08,
59 
60  /// \brief The controlling scope in a if/switch/while/for statement.
61  ControlScope = 0x10,
62 
63  /// \brief The scope of a struct/union/class definition.
64  ClassScope = 0x20,
65 
66  /// \brief This is a scope that corresponds to a block/closure object.
67  /// Blocks serve as top-level scopes for some objects like labels, they
68  /// also prevent things like break and continue. BlockScopes always have
69  /// the FnScope and DeclScope flags set as well.
70  BlockScope = 0x40,
71 
72  /// \brief This is a scope that corresponds to the
73  /// template parameters of a C++ template. Template parameter
74  /// scope starts at the 'template' keyword and ends when the
75  /// template declaration ends.
77 
78  /// \brief This is a scope that corresponds to the
79  /// parameters within a function prototype.
81 
82  /// \brief This is a scope that corresponds to the parameters within
83  /// a function prototype for a function declaration (as opposed to any
84  /// other kind of function declarator). Always has FunctionPrototypeScope
85  /// set as well.
87 
88  /// \brief This is a scope that corresponds to the Objective-C
89  /// \@catch statement.
90  AtCatchScope = 0x400,
91 
92  /// \brief This scope corresponds to an Objective-C method body.
93  /// It always has FnScope and DeclScope set as well.
94  ObjCMethodScope = 0x800,
95 
96  /// \brief This is a scope that corresponds to a switch statement.
97  SwitchScope = 0x1000,
98 
99  /// \brief This is the scope of a C++ try statement.
100  TryScope = 0x2000,
101 
102  /// \brief This is the scope for a function-level C++ try or catch scope.
103  FnTryCatchScope = 0x4000,
104 
105  /// \brief This is the scope of OpenMP executable directive.
107 
108  /// \brief This is the scope of some OpenMP loop directive.
110 
111  /// \brief This is the scope of some OpenMP simd directive.
112  /// For example, it is used for 'omp simd', 'omp for simd'.
113  /// This flag is propagated to children scopes.
115 
116  /// This scope corresponds to an enum.
117  EnumScope = 0x40000,
118 
119  /// This scope corresponds to an SEH try.
120  SEHTryScope = 0x80000,
121 
122  /// This scope corresponds to an SEH except.
123  SEHExceptScope = 0x100000,
124 
125  /// We are currently in the filter expression of an SEH except block.
126  SEHFilterScope = 0x200000,
127  };
128 private:
129  /// The parent scope for this scope. This is null for the translation-unit
130  /// scope.
131  Scope *AnyParent;
132 
133  /// Flags - This contains a set of ScopeFlags, which indicates how the scope
134  /// interrelates with other control flow statements.
135  unsigned Flags;
136 
137  /// Depth - This is the depth of this scope. The translation-unit scope has
138  /// depth 0.
139  unsigned short Depth;
140 
141  /// \brief Declarations with static linkage are mangled with the number of
142  /// scopes seen as a component.
143  unsigned short MSLastManglingNumber;
144 
145  unsigned short MSCurManglingNumber;
146 
147  /// PrototypeDepth - This is the number of function prototype scopes
148  /// enclosing this scope, including this scope.
149  unsigned short PrototypeDepth;
150 
151  /// PrototypeIndex - This is the number of parameters currently
152  /// declared in this scope.
153  unsigned short PrototypeIndex;
154 
155  /// FnParent - If this scope has a parent scope that is a function body, this
156  /// pointer is non-null and points to it. This is used for label processing.
157  Scope *FnParent;
158  Scope *MSLastManglingParent;
159 
160  /// BreakParent/ContinueParent - This is a direct link to the innermost
161  /// BreakScope/ContinueScope which contains the contents of this scope
162  /// for control flow purposes (and might be this scope itself), or null
163  /// if there is no such scope.
164  Scope *BreakParent, *ContinueParent;
165 
166  /// BlockParent - This is a direct link to the immediately containing
167  /// BlockScope if this scope is not one, or null if there is none.
168  Scope *BlockParent;
169 
170  /// TemplateParamParent - This is a direct link to the
171  /// immediately containing template parameter scope. In the
172  /// case of nested templates, template parameter scopes can have
173  /// other template parameter scopes as parents.
174  Scope *TemplateParamParent;
175 
176  /// DeclsInScope - This keeps track of all declarations in this scope. When
177  /// the declaration is added to the scope, it is set as the current
178  /// declaration for the identifier in the IdentifierTable. When the scope is
179  /// popped, these declarations are removed from the IdentifierTable's notion
180  /// of current declaration. It is up to the current Action implementation to
181  /// implement these semantics.
182  typedef llvm::SmallPtrSet<Decl *, 32> DeclSetTy;
183  DeclSetTy DeclsInScope;
184 
185  /// The DeclContext with which this scope is associated. For
186  /// example, the entity of a class scope is the class itself, the
187  /// entity of a function scope is a function, etc.
188  DeclContext *Entity;
189 
190  typedef SmallVector<UsingDirectiveDecl *, 2> UsingDirectivesTy;
191  UsingDirectivesTy UsingDirectives;
192 
193  /// \brief Used to determine if errors occurred in this scope.
194  DiagnosticErrorTrap ErrorTrap;
195 
196  /// A lattice consisting of undefined, a single NRVO candidate variable in
197  /// this scope, or over-defined. The bit is true when over-defined.
198  llvm::PointerIntPair<VarDecl *, 1, bool> NRVO;
199 
200  void setFlags(Scope *Parent, unsigned F);
201 
202 public:
204  : ErrorTrap(Diag) {
205  Init(Parent, ScopeFlags);
206  }
207 
208  /// getFlags - Return the flags for this scope.
209  ///
210  unsigned getFlags() const { return Flags; }
211  void setFlags(unsigned F) { setFlags(getParent(), F); }
212 
213  /// isBlockScope - Return true if this scope correspond to a closure.
214  bool isBlockScope() const { return Flags & BlockScope; }
215 
216  /// getParent - Return the scope that this is nested in.
217  ///
218  const Scope *getParent() const { return AnyParent; }
219  Scope *getParent() { return AnyParent; }
220 
221  /// getFnParent - Return the closest scope that is a function body.
222  ///
223  const Scope *getFnParent() const { return FnParent; }
224  Scope *getFnParent() { return FnParent; }
225 
227  return MSLastManglingParent;
228  }
229  Scope *getMSLastManglingParent() { return MSLastManglingParent; }
230 
231  /// getContinueParent - Return the closest scope that a continue statement
232  /// would be affected by.
234  return ContinueParent;
235  }
236 
237  const Scope *getContinueParent() const {
238  return const_cast<Scope*>(this)->getContinueParent();
239  }
240 
241  /// getBreakParent - Return the closest scope that a break statement
242  /// would be affected by.
244  return BreakParent;
245  }
246  const Scope *getBreakParent() const {
247  return const_cast<Scope*>(this)->getBreakParent();
248  }
249 
250  Scope *getBlockParent() { return BlockParent; }
251  const Scope *getBlockParent() const { return BlockParent; }
252 
253  Scope *getTemplateParamParent() { return TemplateParamParent; }
254  const Scope *getTemplateParamParent() const { return TemplateParamParent; }
255 
256  /// Returns the number of function prototype scopes in this scope
257  /// chain.
258  unsigned getFunctionPrototypeDepth() const {
259  return PrototypeDepth;
260  }
261 
262  /// Return the number of parameters declared in this function
263  /// prototype, increasing it by one for the next call.
265  assert(isFunctionPrototypeScope());
266  return PrototypeIndex++;
267  }
268 
269  typedef llvm::iterator_range<DeclSetTy::iterator> decl_range;
270  decl_range decls() const {
271  return decl_range(DeclsInScope.begin(), DeclsInScope.end());
272  }
273  bool decl_empty() const { return DeclsInScope.empty(); }
274 
275  void AddDecl(Decl *D) {
276  DeclsInScope.insert(D);
277  }
278 
279  void RemoveDecl(Decl *D) {
280  DeclsInScope.erase(D);
281  }
282 
284  if (Scope *MSLMP = getMSLastManglingParent()) {
285  MSLMP->MSLastManglingNumber += 1;
286  MSCurManglingNumber += 1;
287  }
288  }
289 
291  if (Scope *MSLMP = getMSLastManglingParent()) {
292  MSLMP->MSLastManglingNumber -= 1;
293  MSCurManglingNumber -= 1;
294  }
295  }
296 
297  unsigned getMSLastManglingNumber() const {
298  if (const Scope *MSLMP = getMSLastManglingParent())
299  return MSLMP->MSLastManglingNumber;
300  return 1;
301  }
302 
303  unsigned getMSCurManglingNumber() const {
304  return MSCurManglingNumber;
305  }
306 
307  /// isDeclScope - Return true if this is the scope that the specified decl is
308  /// declared in.
309  bool isDeclScope(Decl *D) {
310  return DeclsInScope.count(D) != 0;
311  }
312 
313  DeclContext *getEntity() const { return Entity; }
314  void setEntity(DeclContext *E) { Entity = E; }
315 
316  bool hasErrorOccurred() const { return ErrorTrap.hasErrorOccurred(); }
317 
319  return ErrorTrap.hasUnrecoverableErrorOccurred();
320  }
321 
322  /// isFunctionScope() - Return true if this scope is a function scope.
323  bool isFunctionScope() const { return (getFlags() & Scope::FnScope); }
324 
325  /// isClassScope - Return true if this scope is a class/struct/union scope.
326  bool isClassScope() const {
327  return (getFlags() & Scope::ClassScope);
328  }
329 
330  /// isInCXXInlineMethodScope - Return true if this scope is a C++ inline
331  /// method scope or is inside one.
333  if (const Scope *FnS = getFnParent()) {
334  assert(FnS->getParent() && "TUScope not created?");
335  return FnS->getParent()->isClassScope();
336  }
337  return false;
338  }
339 
340  /// isInObjcMethodScope - Return true if this scope is, or is contained in, an
341  /// Objective-C method body. Note that this method is not constant time.
342  bool isInObjcMethodScope() const {
343  for (const Scope *S = this; S; S = S->getParent()) {
344  // If this scope is an objc method scope, then we succeed.
345  if (S->getFlags() & ObjCMethodScope)
346  return true;
347  }
348  return false;
349  }
350 
351  /// isInObjcMethodOuterScope - Return true if this scope is an
352  /// Objective-C method outer most body.
354  if (const Scope *S = this) {
355  // If this scope is an objc method scope, then we succeed.
356  if (S->getFlags() & ObjCMethodScope)
357  return true;
358  }
359  return false;
360  }
361 
362 
363  /// isTemplateParamScope - Return true if this scope is a C++
364  /// template parameter scope.
365  bool isTemplateParamScope() const {
367  }
368 
369  /// isFunctionPrototypeScope - Return true if this scope is a
370  /// function prototype scope.
373  }
374 
375  /// isAtCatchScope - Return true if this scope is \@catch.
376  bool isAtCatchScope() const {
377  return getFlags() & Scope::AtCatchScope;
378  }
379 
380  /// isSwitchScope - Return true if this scope is a switch scope.
381  bool isSwitchScope() const {
382  for (const Scope *S = this; S; S = S->getParent()) {
383  if (S->getFlags() & Scope::SwitchScope)
384  return true;
385  else if (S->getFlags() & (Scope::FnScope | Scope::ClassScope |
389  return false;
390  }
391  return false;
392  }
393 
394  /// \brief Determines whether this scope is the OpenMP directive scope
395  bool isOpenMPDirectiveScope() const {
397  }
398 
399  /// \brief Determine whether this scope is some OpenMP loop directive scope
400  /// (for example, 'omp for', 'omp simd').
403  assert(isOpenMPDirectiveScope() &&
404  "OpenMP loop directive scope is not a directive scope");
405  return true;
406  }
407  return false;
408  }
409 
410  /// \brief Determine whether this scope is (or is nested into) some OpenMP
411  /// loop simd directive scope (for example, 'omp simd', 'omp for simd').
414  }
415 
416  /// \brief Determine whether this scope is a loop having OpenMP loop
417  /// directive attached.
418  bool isOpenMPLoopScope() const {
419  const Scope *P = getParent();
420  return P && P->isOpenMPLoopDirectiveScope();
421  }
422 
423  /// \brief Determine whether this scope is a C++ 'try' block.
424  bool isTryScope() const { return getFlags() & Scope::TryScope; }
425 
426  /// \brief Determine whether this scope is a SEH '__try' block.
427  bool isSEHTryScope() const { return getFlags() & Scope::SEHTryScope; }
428 
429  /// \brief Determine whether this scope is a SEH '__except' block.
430  bool isSEHExceptScope() const { return getFlags() & Scope::SEHExceptScope; }
431 
432  /// \brief Returns if rhs has a higher scope depth than this.
433  ///
434  /// The caller is responsible for calling this only if one of the two scopes
435  /// is an ancestor of the other.
436  bool Contains(const Scope& rhs) const { return Depth < rhs.Depth; }
437 
438  /// containedInPrototypeScope - Return true if this or a parent scope
439  /// is a FunctionPrototypeScope.
440  bool containedInPrototypeScope() const;
441 
443  UsingDirectives.push_back(UDir);
444  }
445 
446  typedef llvm::iterator_range<UsingDirectivesTy::iterator>
448 
450  return using_directives_range(UsingDirectives.begin(),
451  UsingDirectives.end());
452  }
453 
455  if (NRVO.getInt())
456  return;
457  if (NRVO.getPointer() == nullptr) {
458  NRVO.setPointer(VD);
459  return;
460  }
461  if (NRVO.getPointer() != VD)
462  setNoNRVO();
463  }
464 
465  void setNoNRVO() {
466  NRVO.setInt(1);
467  NRVO.setPointer(nullptr);
468  }
469 
470  void mergeNRVOIntoParent();
471 
472  /// Init - This is used by the parser to implement scope caching.
473  ///
474  void Init(Scope *parent, unsigned flags);
475 
476  /// \brief Sets up the specified scope flags and adjusts the scope state
477  /// variables accordingly.
478  ///
479  void AddFlags(unsigned Flags);
480 
481  void dumpImpl(raw_ostream &OS) const;
482  void dump() const;
483 };
484 
485 } // end namespace clang
486 
487 #endif
Scope * getFnParent()
Definition: Scope.h:224
void AddFlags(unsigned Flags)
Sets up the specified scope flags and adjusts the scope state variables accordingly.
Definition: Scope.cpp:108
unsigned getFlags() const
getFlags - Return the flags for this scope.
Definition: Scope.h:210
This is the scope of a C++ try statement.
Definition: Scope.h:100
const Scope * getContinueParent() const
Definition: Scope.h:237
static DiagnosticBuilder Diag(DiagnosticsEngine *Diags, const LangOptions &Features, FullSourceLoc TokLoc, const char *TokBegin, const char *TokRangeBegin, const char *TokRangeEnd, unsigned DiagID)
Produce a diagnostic highlighting some portion of a literal.
This is a scope that corresponds to the parameters within a function prototype.
Definition: Scope.h:80
bool hasErrorOccurred() const
Definition: Scope.h:316
const Scope * getFnParent() const
getFnParent - Return the closest scope that is a function body.
Definition: Scope.h:223
const Scope * getParent() const
getParent - Return the scope that this is nested in.
Definition: Scope.h:218
Scope * getBlockParent()
Definition: Scope.h:250
void setFlags(unsigned F)
Definition: Scope.h:211
StringRef P
This is a while, do, switch, for, etc that can have break statements embedded into it...
Definition: Scope.h:50
void AddDecl(Decl *D)
Definition: Scope.h:275
This indicates that the scope corresponds to a function, which means that labels are set here...
Definition: Scope.h:46
unsigned getFunctionPrototypeDepth() const
Returns the number of function prototype scopes in this scope chain.
Definition: Scope.h:258
Scope * getContinueParent()
getContinueParent - Return the closest scope that a continue statement would be affected by...
Definition: Scope.h:233
bool hasErrorOccurred() const
Determine whether any errors have occurred since this object instance was created.
Definition: Diagnostic.h:840
VarDecl - An instance of this class is created to represent a variable declaration or definition...
Definition: Decl.h:768
ScopeFlags
ScopeFlags - These are bitfields that are or'd together when creating a scope, which defines the sort...
Definition: Scope.h:43
RAII class that determines when any errors have occurred between the time the instance was created an...
Definition: Diagnostic.h:829
Scope(Scope *Parent, unsigned ScopeFlags, DiagnosticsEngine &Diag)
Definition: Scope.h:203
bool isInObjcMethodOuterScope() const
isInObjcMethodOuterScope - Return true if this scope is an Objective-C method outer most body...
Definition: Scope.h:353
Scope * getTemplateParamParent()
Definition: Scope.h:253
bool decl_empty() const
Definition: Scope.h:273
void dump() const
Definition: Scope.cpp:137
bool isSEHTryScope() const
Determine whether this scope is a SEH '__try' block.
Definition: Scope.h:427
bool Contains(const Scope &rhs) const
Returns if rhs has a higher scope depth than this.
Definition: Scope.h:436
void decrementMSManglingNumber()
Definition: Scope.h:290
void setNoNRVO()
Definition: Scope.h:465
Scope * getBreakParent()
getBreakParent - Return the closest scope that a break statement would be affected by...
Definition: Scope.h:243
The controlling scope in a if/switch/while/for statement.
Definition: Scope.h:61
This is a scope that corresponds to a block/closure object.
Definition: Scope.h:70
bool hasUnrecoverableErrorOccurred() const
Determine whether any unrecoverable errors have occurred since this object instance was created...
Definition: Diagnostic.h:846
This scope corresponds to an enum.
Definition: Scope.h:117
This is a scope that corresponds to a switch statement.
Definition: Scope.h:97
bool isOpenMPSimdDirectiveScope() const
Determine whether this scope is (or is nested into) some OpenMP loop simd directive scope (for exampl...
Definition: Scope.h:412
bool isOpenMPLoopDirectiveScope() const
Determine whether this scope is some OpenMP loop directive scope (for example, 'omp for'...
Definition: Scope.h:401
This is a while, do, for, which can have continue statements embedded into it.
Definition: Scope.h:54
Concrete class used by the front-end to report problems and issues.
Definition: Diagnostic.h:135
const Scope * getBreakParent() const
Definition: Scope.h:246
Scope - A scope is a transient data structure that is used while parsing the program.
Definition: Scope.h:39
using_directives_range using_directives()
Definition: Scope.h:449
bool isOpenMPLoopScope() const
Determine whether this scope is a loop having OpenMP loop directive attached.
Definition: Scope.h:418
bool hasUnrecoverableErrorOccurred() const
Definition: Scope.h:318
void incrementMSManglingNumber()
Definition: Scope.h:283
unsigned getMSLastManglingNumber() const
Definition: Scope.h:297
llvm::iterator_range< DeclSetTy::iterator > decl_range
Definition: Scope.h:269
bool isAtCatchScope() const
isAtCatchScope - Return true if this scope is @catch.
Definition: Scope.h:376
bool isDeclScope(Decl *D)
isDeclScope - Return true if this is the scope that the specified decl is declared in...
Definition: Scope.h:309
bool isSEHExceptScope() const
Determine whether this scope is a SEH '__except' block.
Definition: Scope.h:430
This is the scope of OpenMP executable directive.
Definition: Scope.h:106
This scope corresponds to an SEH try.
Definition: Scope.h:120
Scope * getMSLastManglingParent()
Definition: Scope.h:229
This scope corresponds to an SEH except.
Definition: Scope.h:123
bool isInCXXInlineMethodScope() const
isInCXXInlineMethodScope - Return true if this scope is a C++ inline method scope or is inside one...
Definition: Scope.h:332
bool isBlockScope() const
isBlockScope - Return true if this scope correspond to a closure.
Definition: Scope.h:214
const Scope * getMSLastManglingParent() const
Definition: Scope.h:226
This is a scope that corresponds to the parameters within a function prototype for a function declara...
Definition: Scope.h:86
DeclContext * getEntity() const
Definition: Scope.h:313
bool isSwitchScope() const
isSwitchScope - Return true if this scope is a switch scope.
Definition: Scope.h:381
bool containedInPrototypeScope() const
containedInPrototypeScope - Return true if this or a parent scope is a FunctionPrototypeScope.
Definition: Scope.cpp:98
Scope * getParent()
Definition: Scope.h:219
This is a scope that corresponds to the Objective-C @catch statement.
Definition: Scope.h:90
bool isTryScope() const
Determine whether this scope is a C++ 'try' block.
Definition: Scope.h:424
void setEntity(DeclContext *E)
Definition: Scope.h:314
bool isOpenMPDirectiveScope() const
Determines whether this scope is the OpenMP directive scope.
Definition: Scope.h:395
bool isTemplateParamScope() const
isTemplateParamScope - Return true if this scope is a C++ template parameter scope.
Definition: Scope.h:365
decl_range decls() const
Definition: Scope.h:270
const Scope * getTemplateParamParent() const
Definition: Scope.h:254
void dumpImpl(raw_ostream &OS) const
Definition: Scope.cpp:139
void Init(Scope *parent, unsigned flags)
Init - This is used by the parser to implement scope caching.
Definition: Scope.cpp:88
We are currently in the filter expression of an SEH except block.
Definition: Scope.h:126
The scope of a struct/union/class definition.
Definition: Scope.h:64
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
Definition: DeclBase.h:1135
unsigned getMSCurManglingNumber() const
Definition: Scope.h:303
This is the scope of some OpenMP simd directive.
Definition: Scope.h:114
const Scope * getBlockParent() const
Definition: Scope.h:251
void addNRVOCandidate(VarDecl *VD)
Definition: Scope.h:454
unsigned getNextFunctionPrototypeIndex()
Return the number of parameters declared in this function prototype, increasing it by one for the nex...
Definition: Scope.h:264
This is a scope that corresponds to the template parameters of a C++ template.
Definition: Scope.h:76
detail::InMemoryDirectory::const_iterator E
void mergeNRVOIntoParent()
Definition: Scope.cpp:122
llvm::iterator_range< UsingDirectivesTy::iterator > using_directives_range
Definition: Scope.h:447
Defines the Diagnostic-related interfaces.
void PushUsingDirective(UsingDirectiveDecl *UDir)
Definition: Scope.h:442
void RemoveDecl(Decl *D)
Definition: Scope.h:279
bool isInObjcMethodScope() const
isInObjcMethodScope - Return true if this scope is, or is contained in, an Objective-C method body...
Definition: Scope.h:342
This is the scope for a function-level C++ try or catch scope.
Definition: Scope.h:103
This is a scope that can contain a declaration.
Definition: Scope.h:58
bool isFunctionPrototypeScope() const
isFunctionPrototypeScope - Return true if this scope is a function prototype scope.
Definition: Scope.h:371
bool isClassScope() const
isClassScope - Return true if this scope is a class/struct/union scope.
Definition: Scope.h:326
bool isFunctionScope() const
isFunctionScope() - Return true if this scope is a function scope.
Definition: Scope.h:323
This is the scope of some OpenMP loop directive.
Definition: Scope.h:109
Represents C++ using-directive.
Definition: DeclCXX.h:2615
This scope corresponds to an Objective-C method body.
Definition: Scope.h:94