diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-02-12 18:34:31 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-02-12 18:34:31 +0000 |
commit | 78492dae00fb85e0da0f966df4745edafdafb66c (patch) | |
tree | 0fee82b42ca28dedd47f1367eb545ea6a1e2539a | |
parent | 8e49dd6e7e73b275a74338a5127a524f0765303c (diff) |
Moved class declaration for ObjCForCollectionStmt to be co-located with
the class declarations for the other ObjC***Stmt classes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47013 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/AST/Stmt.h | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/include/clang/AST/Stmt.h b/include/clang/AST/Stmt.h index e92c4faea7..662fbac174 100644 --- a/include/clang/AST/Stmt.h +++ b/include/clang/AST/Stmt.h @@ -577,48 +577,6 @@ public: virtual void EmitImpl(llvm::Serializer& S) const; static ForStmt* CreateImpl(llvm::Deserializer& D); }; - -/// ObjCForCollectionStmt - This represents Objective-c's collection statement; -/// represented as 'for (element 'in' collection-expression)' stmt. -/// -class ObjCForCollectionStmt : public Stmt { - enum { ELEM, COLLECTION, BODY, END_EXPR }; - Stmt* SubExprs[END_EXPR]; // SubExprs[ELEM] is an expression or declstmt. - SourceLocation ForLoc; - SourceLocation RParenLoc; -public: - ObjCForCollectionStmt(Stmt *Elem, Expr *Collect, Stmt *Body, - SourceLocation FCL, SourceLocation RPL); - - Stmt *getElement() { return SubExprs[ELEM]; } - Expr *getCollection() { - return reinterpret_cast<Expr*>(SubExprs[COLLECTION]); - } - Stmt *getBody() { return SubExprs[BODY]; } - - const Stmt *getElement() const { return SubExprs[ELEM]; } - const Expr *getCollection() const { - return reinterpret_cast<Expr*>(SubExprs[COLLECTION]); - } - const Stmt *getBody() const { return SubExprs[BODY]; } - - SourceLocation getRParenLoc() const { return RParenLoc; } - - virtual SourceRange getSourceRange() const { - return SourceRange(ForLoc, SubExprs[BODY]->getLocEnd()); - } - static bool classof(const Stmt *T) { - return T->getStmtClass() == ObjCForCollectionStmtClass; - } - static bool classof(const ObjCForCollectionStmt *) { return true; } - - // Iterators - virtual child_iterator child_begin(); - virtual child_iterator child_end(); - - virtual void EmitImpl(llvm::Serializer& S) const; - static ObjCForCollectionStmt* CreateImpl(llvm::Deserializer& D); -}; /// GotoStmt - This represents a direct goto. /// @@ -823,6 +781,48 @@ public: virtual void EmitImpl(llvm::Serializer& S) const; static AsmStmt* CreateImpl(llvm::Deserializer& D); }; + +/// ObjCForCollectionStmt - This represents Objective-c's collection statement; +/// represented as 'for (element 'in' collection-expression)' stmt. +/// +class ObjCForCollectionStmt : public Stmt { + enum { ELEM, COLLECTION, BODY, END_EXPR }; + Stmt* SubExprs[END_EXPR]; // SubExprs[ELEM] is an expression or declstmt. + SourceLocation ForLoc; + SourceLocation RParenLoc; +public: + ObjCForCollectionStmt(Stmt *Elem, Expr *Collect, Stmt *Body, + SourceLocation FCL, SourceLocation RPL); + + Stmt *getElement() { return SubExprs[ELEM]; } + Expr *getCollection() { + return reinterpret_cast<Expr*>(SubExprs[COLLECTION]); + } + Stmt *getBody() { return SubExprs[BODY]; } + + const Stmt *getElement() const { return SubExprs[ELEM]; } + const Expr *getCollection() const { + return reinterpret_cast<Expr*>(SubExprs[COLLECTION]); + } + const Stmt *getBody() const { return SubExprs[BODY]; } + + SourceLocation getRParenLoc() const { return RParenLoc; } + + virtual SourceRange getSourceRange() const { + return SourceRange(ForLoc, SubExprs[BODY]->getLocEnd()); + } + static bool classof(const Stmt *T) { + return T->getStmtClass() == ObjCForCollectionStmtClass; + } + static bool classof(const ObjCForCollectionStmt *) { return true; } + + // Iterators + virtual child_iterator child_begin(); + virtual child_iterator child_end(); + + virtual void EmitImpl(llvm::Serializer& S) const; + static ObjCForCollectionStmt* CreateImpl(llvm::Deserializer& D); +}; /// ObjCAtCatchStmt - This represents objective-c's @catch statement. class ObjCAtCatchStmt : public Stmt { |