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