From 78492dae00fb85e0da0f966df4745edafdafb66c Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Tue, 12 Feb 2008 18:34:31 +0000 Subject: [PATCH] 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 --- include/clang/AST/Stmt.h | 84 ++++++++++++++++++++-------------------- 1 file 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(SubExprs[COLLECTION]); - } - Stmt *getBody() { return SubExprs[BODY]; } - - const Stmt *getElement() const { return SubExprs[ELEM]; } - const Expr *getCollection() const { - return reinterpret_cast(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(SubExprs[COLLECTION]); + } + Stmt *getBody() { return SubExprs[BODY]; } + + const Stmt *getElement() const { return SubExprs[ELEM]; } + const Expr *getCollection() const { + return reinterpret_cast(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 { -- 2.50.1