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