[cfe-commits] r39548 - /cfe/cfe/trunk/include/clang/AST/Stmt.h

clattner at cs.uiuc.edu clattner at cs.uiuc.edu
Wed Jul 11 09:45:29 PDT 2007


Author: clattner
Date: Wed Jul 11 11:45:29 2007
New Revision: 39548

URL: http://llvm.org/viewvc/llvm-project?rev=39548&view=rev
Log:
DeclStmt can be just about any type of decl.

Modified:
    cfe/cfe/trunk/include/clang/AST/Stmt.h

Modified: cfe/cfe/trunk/include/clang/AST/Stmt.h
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/include/clang/AST/Stmt.h?rev=39548&r1=39547&r2=39548&view=diff

==============================================================================
--- cfe/cfe/trunk/include/clang/AST/Stmt.h (original)
+++ cfe/cfe/trunk/include/clang/AST/Stmt.h Wed Jul 11 11:45:29 2007
@@ -69,11 +69,12 @@
 /// the first statement can be an expression or a declaration.
 ///
 class DeclStmt : public Stmt {
-  Decl *BlockVarOrTypedefDecl;
+  Decl *TheDecl;
 public:
-  DeclStmt(Decl *D) : Stmt(DeclStmtClass), BlockVarOrTypedefDecl(D) {}
+  DeclStmt(Decl *D) : Stmt(DeclStmtClass), TheDecl(D) {}
   
-  Decl *getDecl() const { return BlockVarOrTypedefDecl; }
+  const Decl *getDecl() const { return TheDecl; }
+  Decl *getDecl() { return TheDecl; }
   
   virtual void visit(StmtVisitor &Visitor);
   static bool classof(const Stmt *T) { 
@@ -353,6 +354,7 @@
 public:
   ReturnStmt(Expr *E = 0) : Stmt(ReturnStmtClass), RetExpr(E) {}
   
+  const Expr *getRetValue() const { return RetExpr; }
   Expr *getRetValue() { return RetExpr; }
   
   virtual void visit(StmtVisitor &Visitor);





More information about the cfe-commits mailing list