clang  7.0.0
StmtObjC.h
Go to the documentation of this file.
1 //===--- StmtObjC.h - Classes for representing ObjC statements --*- 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 /// \file
11 /// Defines the Objective-C statement AST node classes.
12 
13 #ifndef LLVM_CLANG_AST_STMTOBJC_H
14 #define LLVM_CLANG_AST_STMTOBJC_H
15 
16 #include "clang/AST/Stmt.h"
17 #include "llvm/Support/Compiler.h"
18 
19 namespace clang {
20 
21 /// Represents Objective-C's collection statement.
22 ///
23 /// This is represented as 'for (element 'in' collection-expression)' stmt.
24 class ObjCForCollectionStmt : public Stmt {
25  enum { ELEM, COLLECTION, BODY, END_EXPR };
26  Stmt* SubExprs[END_EXPR]; // SubExprs[ELEM] is an expression or declstmt.
27  SourceLocation ForLoc;
28  SourceLocation RParenLoc;
29 public:
30  ObjCForCollectionStmt(Stmt *Elem, Expr *Collect, Stmt *Body,
33  Stmt(ObjCForCollectionStmtClass, Empty) { }
34 
35  Stmt *getElement() { return SubExprs[ELEM]; }
37  return reinterpret_cast<Expr*>(SubExprs[COLLECTION]);
38  }
39  Stmt *getBody() { return SubExprs[BODY]; }
40 
41  const Stmt *getElement() const { return SubExprs[ELEM]; }
42  const Expr *getCollection() const {
43  return reinterpret_cast<Expr*>(SubExprs[COLLECTION]);
44  }
45  const Stmt *getBody() const { return SubExprs[BODY]; }
46 
47  void setElement(Stmt *S) { SubExprs[ELEM] = S; }
48  void setCollection(Expr *E) {
49  SubExprs[COLLECTION] = reinterpret_cast<Stmt*>(E);
50  }
51  void setBody(Stmt *S) { SubExprs[BODY] = S; }
52 
53  SourceLocation getForLoc() const { return ForLoc; }
54  void setForLoc(SourceLocation Loc) { ForLoc = Loc; }
55  SourceLocation getRParenLoc() const { return RParenLoc; }
56  void setRParenLoc(SourceLocation Loc) { RParenLoc = Loc; }
57 
58  SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
59  SourceLocation getBeginLoc() const LLVM_READONLY { return ForLoc; }
60  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
61  SourceLocation getEndLoc() const LLVM_READONLY {
62  return SubExprs[BODY]->getLocEnd();
63  }
64 
65  static bool classof(const Stmt *T) {
66  return T->getStmtClass() == ObjCForCollectionStmtClass;
67  }
68 
69  // Iterators
71  return child_range(&SubExprs[0], &SubExprs[END_EXPR]);
72  }
73 };
74 
75 /// Represents Objective-C's \@catch statement.
76 class ObjCAtCatchStmt : public Stmt {
77 private:
78  VarDecl *ExceptionDecl;
79  Stmt *Body;
80  SourceLocation AtCatchLoc, RParenLoc;
81 
82 public:
84  VarDecl *catchVarDecl,
85  Stmt *atCatchStmt)
86  : Stmt(ObjCAtCatchStmtClass), ExceptionDecl(catchVarDecl),
87  Body(atCatchStmt), AtCatchLoc(atCatchLoc), RParenLoc(rparenloc) { }
88 
89  explicit ObjCAtCatchStmt(EmptyShell Empty) :
90  Stmt(ObjCAtCatchStmtClass, Empty) { }
91 
92  const Stmt *getCatchBody() const { return Body; }
93  Stmt *getCatchBody() { return Body; }
94  void setCatchBody(Stmt *S) { Body = S; }
95 
96  const VarDecl *getCatchParamDecl() const {
97  return ExceptionDecl;
98  }
100  return ExceptionDecl;
101  }
102  void setCatchParamDecl(VarDecl *D) { ExceptionDecl = D; }
103 
104  SourceLocation getAtCatchLoc() const { return AtCatchLoc; }
105  void setAtCatchLoc(SourceLocation Loc) { AtCatchLoc = Loc; }
106  SourceLocation getRParenLoc() const { return RParenLoc; }
107  void setRParenLoc(SourceLocation Loc) { RParenLoc = Loc; }
108 
109  SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
110  SourceLocation getBeginLoc() const LLVM_READONLY { return AtCatchLoc; }
111  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
112  SourceLocation getEndLoc() const LLVM_READONLY { return Body->getLocEnd(); }
113 
114  bool hasEllipsis() const { return getCatchParamDecl() == nullptr; }
115 
116  static bool classof(const Stmt *T) {
117  return T->getStmtClass() == ObjCAtCatchStmtClass;
118  }
119 
120  child_range children() { return child_range(&Body, &Body + 1); }
121 };
122 
123 /// Represents Objective-C's \@finally statement
124 class ObjCAtFinallyStmt : public Stmt {
125  SourceLocation AtFinallyLoc;
126  Stmt *AtFinallyStmt;
127 
128 public:
129  ObjCAtFinallyStmt(SourceLocation atFinallyLoc, Stmt *atFinallyStmt)
130  : Stmt(ObjCAtFinallyStmtClass), AtFinallyLoc(atFinallyLoc),
131  AtFinallyStmt(atFinallyStmt) {}
132 
133  explicit ObjCAtFinallyStmt(EmptyShell Empty) :
134  Stmt(ObjCAtFinallyStmtClass, Empty) { }
135 
136  const Stmt *getFinallyBody() const { return AtFinallyStmt; }
137  Stmt *getFinallyBody() { return AtFinallyStmt; }
138  void setFinallyBody(Stmt *S) { AtFinallyStmt = S; }
139 
140  SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
141  SourceLocation getBeginLoc() const LLVM_READONLY { return AtFinallyLoc; }
142  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
143  SourceLocation getEndLoc() const LLVM_READONLY {
144  return AtFinallyStmt->getLocEnd();
145  }
146 
147  SourceLocation getAtFinallyLoc() const { return AtFinallyLoc; }
148  void setAtFinallyLoc(SourceLocation Loc) { AtFinallyLoc = Loc; }
149 
150  static bool classof(const Stmt *T) {
151  return T->getStmtClass() == ObjCAtFinallyStmtClass;
152  }
153 
155  return child_range(&AtFinallyStmt, &AtFinallyStmt+1);
156  }
157 };
158 
159 /// Represents Objective-C's \@try ... \@catch ... \@finally statement.
160 class ObjCAtTryStmt : public Stmt {
161 private:
162  // The location of the @ in the \@try.
163  SourceLocation AtTryLoc;
164 
165  // The number of catch blocks in this statement.
166  unsigned NumCatchStmts : 16;
167 
168  // Whether this statement has a \@finally statement.
169  bool HasFinally : 1;
170 
171  /// Retrieve the statements that are stored after this \@try statement.
172  ///
173  /// The order of the statements in memory follows the order in the source,
174  /// with the \@try body first, followed by the \@catch statements (if any)
175  /// and, finally, the \@finally (if it exists).
176  Stmt **getStmts() { return reinterpret_cast<Stmt **> (this + 1); }
177  const Stmt* const *getStmts() const {
178  return reinterpret_cast<const Stmt * const*> (this + 1);
179  }
180 
181  ObjCAtTryStmt(SourceLocation atTryLoc, Stmt *atTryStmt,
182  Stmt **CatchStmts, unsigned NumCatchStmts,
183  Stmt *atFinallyStmt);
184 
185  explicit ObjCAtTryStmt(EmptyShell Empty, unsigned NumCatchStmts,
186  bool HasFinally)
187  : Stmt(ObjCAtTryStmtClass, Empty), NumCatchStmts(NumCatchStmts),
188  HasFinally(HasFinally) { }
189 
190 public:
191  static ObjCAtTryStmt *Create(const ASTContext &Context,
192  SourceLocation atTryLoc, Stmt *atTryStmt,
193  Stmt **CatchStmts, unsigned NumCatchStmts,
194  Stmt *atFinallyStmt);
195  static ObjCAtTryStmt *CreateEmpty(const ASTContext &Context,
196  unsigned NumCatchStmts, bool HasFinally);
197 
198  /// Retrieve the location of the @ in the \@try.
199  SourceLocation getAtTryLoc() const { return AtTryLoc; }
200  void setAtTryLoc(SourceLocation Loc) { AtTryLoc = Loc; }
201 
202  /// Retrieve the \@try body.
203  const Stmt *getTryBody() const { return getStmts()[0]; }
204  Stmt *getTryBody() { return getStmts()[0]; }
205  void setTryBody(Stmt *S) { getStmts()[0] = S; }
206 
207  /// Retrieve the number of \@catch statements in this try-catch-finally
208  /// block.
209  unsigned getNumCatchStmts() const { return NumCatchStmts; }
210 
211  /// Retrieve a \@catch statement.
212  const ObjCAtCatchStmt *getCatchStmt(unsigned I) const {
213  assert(I < NumCatchStmts && "Out-of-bounds @catch index");
214  return cast_or_null<ObjCAtCatchStmt>(getStmts()[I + 1]);
215  }
216 
217  /// Retrieve a \@catch statement.
219  assert(I < NumCatchStmts && "Out-of-bounds @catch index");
220  return cast_or_null<ObjCAtCatchStmt>(getStmts()[I + 1]);
221  }
222 
223  /// Set a particular catch statement.
224  void setCatchStmt(unsigned I, ObjCAtCatchStmt *S) {
225  assert(I < NumCatchStmts && "Out-of-bounds @catch index");
226  getStmts()[I + 1] = S;
227  }
228 
229  /// Retrieve the \@finally statement, if any.
231  if (!HasFinally)
232  return nullptr;
233 
234  return cast_or_null<ObjCAtFinallyStmt>(getStmts()[1 + NumCatchStmts]);
235  }
237  if (!HasFinally)
238  return nullptr;
239 
240  return cast_or_null<ObjCAtFinallyStmt>(getStmts()[1 + NumCatchStmts]);
241  }
242  void setFinallyStmt(Stmt *S) {
243  assert(HasFinally && "@try does not have a @finally slot!");
244  getStmts()[1 + NumCatchStmts] = S;
245  }
246 
247  SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
248  SourceLocation getBeginLoc() const LLVM_READONLY { return AtTryLoc; }
249  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
250  SourceLocation getEndLoc() const LLVM_READONLY;
251 
252  static bool classof(const Stmt *T) {
253  return T->getStmtClass() == ObjCAtTryStmtClass;
254  }
255 
257  return child_range(getStmts(),
258  getStmts() + 1 + NumCatchStmts + HasFinally);
259  }
260 };
261 
262 /// Represents Objective-C's \@synchronized statement.
263 ///
264 /// Example:
265 /// \code
266 /// @synchronized (sem) {
267 /// do-something;
268 /// }
269 /// \endcode
270 class ObjCAtSynchronizedStmt : public Stmt {
271 private:
272  SourceLocation AtSynchronizedLoc;
273  enum { SYNC_EXPR, SYNC_BODY, END_EXPR };
274  Stmt* SubStmts[END_EXPR];
275 
276 public:
277  ObjCAtSynchronizedStmt(SourceLocation atSynchronizedLoc, Stmt *synchExpr,
278  Stmt *synchBody)
279  : Stmt(ObjCAtSynchronizedStmtClass) {
280  SubStmts[SYNC_EXPR] = synchExpr;
281  SubStmts[SYNC_BODY] = synchBody;
282  AtSynchronizedLoc = atSynchronizedLoc;
283  }
285  Stmt(ObjCAtSynchronizedStmtClass, Empty) { }
286 
287  SourceLocation getAtSynchronizedLoc() const { return AtSynchronizedLoc; }
288  void setAtSynchronizedLoc(SourceLocation Loc) { AtSynchronizedLoc = Loc; }
289 
290  const CompoundStmt *getSynchBody() const {
291  return reinterpret_cast<CompoundStmt*>(SubStmts[SYNC_BODY]);
292  }
294  return reinterpret_cast<CompoundStmt*>(SubStmts[SYNC_BODY]);
295  }
296  void setSynchBody(Stmt *S) { SubStmts[SYNC_BODY] = S; }
297 
298  const Expr *getSynchExpr() const {
299  return reinterpret_cast<Expr*>(SubStmts[SYNC_EXPR]);
300  }
302  return reinterpret_cast<Expr*>(SubStmts[SYNC_EXPR]);
303  }
304  void setSynchExpr(Stmt *S) { SubStmts[SYNC_EXPR] = S; }
305 
306  SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
307  SourceLocation getBeginLoc() const LLVM_READONLY { return AtSynchronizedLoc; }
308  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
309  SourceLocation getEndLoc() const LLVM_READONLY {
310  return getSynchBody()->getLocEnd();
311  }
312 
313  static bool classof(const Stmt *T) {
314  return T->getStmtClass() == ObjCAtSynchronizedStmtClass;
315  }
316 
318  return child_range(&SubStmts[0], &SubStmts[0]+END_EXPR);
319  }
320 };
321 
322 /// Represents Objective-C's \@throw statement.
323 class ObjCAtThrowStmt : public Stmt {
324  SourceLocation AtThrowLoc;
325  Stmt *Throw;
326 
327 public:
328  ObjCAtThrowStmt(SourceLocation atThrowLoc, Stmt *throwExpr)
329  : Stmt(ObjCAtThrowStmtClass), Throw(throwExpr) {
330  AtThrowLoc = atThrowLoc;
331  }
332  explicit ObjCAtThrowStmt(EmptyShell Empty) :
333  Stmt(ObjCAtThrowStmtClass, Empty) { }
334 
335  const Expr *getThrowExpr() const { return reinterpret_cast<Expr*>(Throw); }
336  Expr *getThrowExpr() { return reinterpret_cast<Expr*>(Throw); }
337  void setThrowExpr(Stmt *S) { Throw = S; }
338 
339  SourceLocation getThrowLoc() const LLVM_READONLY { return AtThrowLoc; }
340  void setThrowLoc(SourceLocation Loc) { AtThrowLoc = Loc; }
341 
342  SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
343  SourceLocation getBeginLoc() const LLVM_READONLY { return AtThrowLoc; }
344  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
345  SourceLocation getEndLoc() const LLVM_READONLY {
346  return Throw ? Throw->getLocEnd() : AtThrowLoc;
347  }
348 
349  static bool classof(const Stmt *T) {
350  return T->getStmtClass() == ObjCAtThrowStmtClass;
351  }
352 
353  child_range children() { return child_range(&Throw, &Throw+1); }
354 };
355 
356 /// Represents Objective-C's \@autoreleasepool Statement
358  SourceLocation AtLoc;
359  Stmt *SubStmt;
360 
361 public:
363  : Stmt(ObjCAutoreleasePoolStmtClass), AtLoc(atLoc), SubStmt(subStmt) {}
364 
366  Stmt(ObjCAutoreleasePoolStmtClass, Empty) { }
367 
368  const Stmt *getSubStmt() const { return SubStmt; }
369  Stmt *getSubStmt() { return SubStmt; }
370  void setSubStmt(Stmt *S) { SubStmt = S; }
371 
372  SourceLocation getLocStart() const LLVM_READONLY { return getBeginLoc(); }
373  SourceLocation getBeginLoc() const LLVM_READONLY { return AtLoc; }
374  SourceLocation getLocEnd() const LLVM_READONLY { return getEndLoc(); }
375  SourceLocation getEndLoc() const LLVM_READONLY {
376  return SubStmt->getLocEnd();
377  }
378 
379  SourceLocation getAtLoc() const { return AtLoc; }
380  void setAtLoc(SourceLocation Loc) { AtLoc = Loc; }
381 
382  static bool classof(const Stmt *T) {
383  return T->getStmtClass() == ObjCAutoreleasePoolStmtClass;
384  }
385 
386  child_range children() { return child_range(&SubStmt, &SubStmt + 1); }
387 };
388 
389 } // end namespace clang
390 
391 #endif
SourceLocation getLocStart() const LLVM_READONLY
Definition: StmtObjC.h:342
static bool classof(const Stmt *T)
Definition: StmtObjC.h:252
ObjCAtSynchronizedStmt(SourceLocation atSynchronizedLoc, Stmt *synchExpr, Stmt *synchBody)
Definition: StmtObjC.h:277
VarDecl * getCatchParamDecl()
Definition: StmtObjC.h:99
ObjCForCollectionStmt(EmptyShell Empty)
Definition: StmtObjC.h:32
SourceLocation getRParenLoc() const
Definition: StmtObjC.h:106
ObjCAutoreleasePoolStmt(EmptyShell Empty)
Definition: StmtObjC.h:365
Stmt - This represents one statement.
Definition: Stmt.h:66
const ObjCAtFinallyStmt * getFinallyStmt() const
Retrieve the @finally statement, if any.
Definition: StmtObjC.h:230
ObjCAtCatchStmt(EmptyShell Empty)
Definition: StmtObjC.h:89
SourceLocation getEndLoc() const LLVM_READONLY
Definition: StmtObjC.h:345
void setThrowExpr(Stmt *S)
Definition: StmtObjC.h:337
Represents Objective-C&#39;s @throw statement.
Definition: StmtObjC.h:323
llvm::iterator_range< child_iterator > child_range
Definition: Stmt.h:458
SourceLocation getLocStart() const LLVM_READONLY
Definition: StmtObjC.h:247
static bool classof(const Stmt *T)
Definition: StmtObjC.h:382
SourceLocation getLocStart() const LLVM_READONLY
Definition: StmtObjC.h:372
Represents a variable declaration or definition.
Definition: Decl.h:814
Stmt(StmtClass SC, EmptyShell)
Construct an empty statement.
Definition: Stmt.h:379
const Stmt * getSubStmt() const
Definition: StmtObjC.h:368
static bool classof(const Stmt *T)
Definition: StmtObjC.h:116
SourceLocation getLocEnd() const LLVM_READONLY
Definition: StmtObjC.h:142
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Definition: ASTContext.h:150
SourceLocation getEndLoc() const LLVM_READONLY
Definition: StmtObjC.h:112
const Stmt * getElement() const
Definition: StmtObjC.h:41
SourceLocation getLocEnd() const LLVM_READONLY
Definition: StmtObjC.h:60
SourceLocation getEndLoc() const LLVM_READONLY
Definition: StmtObjC.h:375
Represents Objective-C&#39;s @catch statement.
Definition: StmtObjC.h:76
SourceLocation getEndLoc() const LLVM_READONLY
Definition: StmtObjC.h:143
static bool classof(const Stmt *T)
Definition: StmtObjC.h:349
SourceLocation getLocEnd() const LLVM_READONLY
Definition: StmtObjC.h:308
const Expr * getThrowExpr() const
Definition: StmtObjC.h:335
void setSynchBody(Stmt *S)
Definition: StmtObjC.h:296
static bool classof(const Stmt *T)
Definition: StmtObjC.h:150
ObjCAtSynchronizedStmt(EmptyShell Empty)
Definition: StmtObjC.h:284
SourceLocation getLocEnd() const LLVM_READONLY
Definition: StmtObjC.h:374
ObjCAtFinallyStmt * getFinallyStmt()
Definition: StmtObjC.h:236
SourceLocation getBeginLoc() const LLVM_READONLY
Definition: StmtObjC.h:248
const Stmt * getBody() const
Definition: StmtObjC.h:45
void setRParenLoc(SourceLocation Loc)
Definition: StmtObjC.h:56
ObjCAtCatchStmt(SourceLocation atCatchLoc, SourceLocation rparenloc, VarDecl *catchVarDecl, Stmt *atCatchStmt)
Definition: StmtObjC.h:83
Stmt * getTryBody()
Definition: StmtObjC.h:204
const ObjCAtCatchStmt * getCatchStmt(unsigned I) const
Retrieve a @catch statement.
Definition: StmtObjC.h:212
const Expr * getCollection() const
Definition: StmtObjC.h:42
CompoundStmt - This represents a group of statements like { stmt stmt }.
Definition: Stmt.h:616
SourceLocation getLocEnd() const LLVM_READONLY
Definition: StmtObjC.h:344
CompoundStmt * getSynchBody()
Definition: StmtObjC.h:293
SourceLocation getThrowLoc() const LLVM_READONLY
Definition: StmtObjC.h:339
ObjCAtFinallyStmt(SourceLocation atFinallyLoc, Stmt *atFinallyStmt)
Definition: StmtObjC.h:129
void setRParenLoc(SourceLocation Loc)
Definition: StmtObjC.h:107
SourceLocation getLocStart() const LLVM_READONLY
Definition: StmtObjC.h:306
Expr - This represents one expression.
Definition: Expr.h:106
ObjCAtThrowStmt(SourceLocation atThrowLoc, Stmt *throwExpr)
Definition: StmtObjC.h:328
ObjCForCollectionStmt(Stmt *Elem, Expr *Collect, Stmt *Body, SourceLocation FCL, SourceLocation RPL)
Definition: StmtObjC.cpp:21
ObjCAtCatchStmt * getCatchStmt(unsigned I)
Retrieve a @catch statement.
Definition: StmtObjC.h:218
const CompoundStmt * getSynchBody() const
Definition: StmtObjC.h:290
Represents Objective-C&#39;s @synchronized statement.
Definition: StmtObjC.h:270
void setFinallyBody(Stmt *S)
Definition: StmtObjC.h:138
SourceLocation getAtTryLoc() const
Retrieve the location of the @ in the @try.
Definition: StmtObjC.h:199
SourceLocation getBeginLoc() const LLVM_READONLY
Definition: StmtObjC.h:59
child_range children()
Definition: StmtObjC.h:70
Stmt * getCatchBody()
Definition: StmtObjC.h:93
void setFinallyStmt(Stmt *S)
Definition: StmtObjC.h:242
static OMPLinearClause * CreateEmpty(const ASTContext &C, unsigned NumVars)
Creates an empty clause with the place for NumVars variables.
SourceLocation getEndLoc() const LLVM_READONLY
Definition: StmtObjC.h:61
const Stmt * getTryBody() const
Retrieve the @try body.
Definition: StmtObjC.h:203
SourceLocation getAtLoc() const
Definition: StmtObjC.h:379
static bool classof(const Stmt *T)
Definition: StmtObjC.h:65
void setForLoc(SourceLocation Loc)
Definition: StmtObjC.h:54
SourceLocation getForLoc() const
Definition: StmtObjC.h:53
SourceLocation getBeginLoc() const LLVM_READONLY
Definition: StmtObjC.h:110
void setAtTryLoc(SourceLocation Loc)
Definition: StmtObjC.h:200
void setSynchExpr(Stmt *S)
Definition: StmtObjC.h:304
SourceLocation getLocStart() const LLVM_READONLY
Definition: StmtObjC.h:140
Encodes a location in the source.
const Stmt * getCatchBody() const
Definition: StmtObjC.h:92
SourceLocation getBeginLoc() const LLVM_READONLY
Definition: StmtObjC.h:373
void setAtCatchLoc(SourceLocation Loc)
Definition: StmtObjC.h:105
void setCatchParamDecl(VarDecl *D)
Definition: StmtObjC.h:102
child_range children()
Definition: StmtObjC.h:154
SourceLocation getAtFinallyLoc() const
Definition: StmtObjC.h:147
void setThrowLoc(SourceLocation Loc)
Definition: StmtObjC.h:340
SourceLocation getAtCatchLoc() const
Definition: StmtObjC.h:104
SourceLocation getLocEnd() const LLVM_READONLY
Definition: Stmt.h:403
ObjCAutoreleasePoolStmt(SourceLocation atLoc, Stmt *subStmt)
Definition: StmtObjC.h:362
A placeholder type used to construct an empty shell of a type, that will be filled in later (e...
Definition: Stmt.h:338
Dataflow Directional Tag Classes.
const Stmt * getFinallyBody() const
Definition: StmtObjC.h:136
void setCollection(Expr *E)
Definition: StmtObjC.h:48
SourceLocation getBeginLoc() const LLVM_READONLY
Definition: StmtObjC.h:307
StmtClass getStmtClass() const
Definition: Stmt.h:391
static bool classof(const Stmt *T)
Definition: StmtObjC.h:313
const Expr * getSynchExpr() const
Definition: StmtObjC.h:298
SourceLocation getRParenLoc() const
Definition: StmtObjC.h:55
void setElement(Stmt *S)
Definition: StmtObjC.h:47
void setCatchStmt(unsigned I, ObjCAtCatchStmt *S)
Set a particular catch statement.
Definition: StmtObjC.h:224
Represents Objective-C&#39;s collection statement.
Definition: StmtObjC.h:24
bool hasEllipsis() const
Definition: StmtObjC.h:114
child_range children()
Definition: StmtObjC.h:256
void setAtFinallyLoc(SourceLocation Loc)
Definition: StmtObjC.h:148
Represents Objective-C&#39;s @finally statement.
Definition: StmtObjC.h:124
void setCatchBody(Stmt *S)
Definition: StmtObjC.h:94
child_range children()
Definition: StmtObjC.h:120
child_range children()
Definition: StmtObjC.h:353
void setAtSynchronizedLoc(SourceLocation Loc)
Definition: StmtObjC.h:288
SourceLocation getLocEnd() const LLVM_READONLY
Definition: StmtObjC.h:111
ObjCAtFinallyStmt(EmptyShell Empty)
Definition: StmtObjC.h:133
ObjCAtThrowStmt(EmptyShell Empty)
Definition: StmtObjC.h:332
SourceLocation getAtSynchronizedLoc() const
Definition: StmtObjC.h:287
Represents Objective-C&#39;s @try ... @catch ... @finally statement.
Definition: StmtObjC.h:160
unsigned getNumCatchStmts() const
Retrieve the number of @catch statements in this try-catch-finally block.
Definition: StmtObjC.h:209
void setTryBody(Stmt *S)
Definition: StmtObjC.h:205
SourceLocation getBeginLoc() const LLVM_READONLY
Definition: StmtObjC.h:141
const VarDecl * getCatchParamDecl() const
Definition: StmtObjC.h:96
SourceLocation getLocEnd() const LLVM_READONLY
Definition: StmtObjC.h:249
SourceLocation getLocStart() const LLVM_READONLY
Definition: StmtObjC.h:58
SourceLocation getLocStart() const LLVM_READONLY
Definition: StmtObjC.h:109
SourceLocation getEndLoc() const LLVM_READONLY
Definition: StmtObjC.h:309
Represents Objective-C&#39;s @autoreleasepool Statement.
Definition: StmtObjC.h:357
SourceLocation getBeginLoc() const LLVM_READONLY
Definition: StmtObjC.h:343
static OMPLinearClause * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation LParenLoc, OpenMPLinearClauseKind Modifier, SourceLocation ModifierLoc, SourceLocation ColonLoc, SourceLocation EndLoc, ArrayRef< Expr *> VL, ArrayRef< Expr *> PL, ArrayRef< Expr *> IL, Expr *Step, Expr *CalcStep, Stmt *PreInit, Expr *PostUpdate)
Creates clause with a list of variables VL and a linear step Step.
void setAtLoc(SourceLocation Loc)
Definition: StmtObjC.h:380