[cfe-commits] r72651 - /cfe/trunk/include/clang/AST/ExprCXX.h
Anders Carlsson
andersca at mac.com
Sat May 30 17:08:52 PDT 2009
Author: andersca
Date: Sat May 30 19:08:52 2009
New Revision: 72651
URL: http://llvm.org/viewvc/llvm-project?rev=72651&view=rev
Log:
Add more getters to the new AST nodes.
Modified:
cfe/trunk/include/clang/AST/ExprCXX.h
Modified: cfe/trunk/include/clang/AST/ExprCXX.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ExprCXX.h?rev=72651&r1=72650&r2=72651&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/ExprCXX.h (original)
+++ cfe/trunk/include/clang/AST/ExprCXX.h Sat May 30 19:08:52 2009
@@ -425,6 +425,8 @@
static CXXTemporary *Create(ASTContext &C,
const CXXDestructorDecl *Destructor);
void Destroy(ASTContext &C);
+
+ const CXXDestructorDecl *getDestructor() const { return Destructor; }
};
/// CXXBindTemporaryExpr - Represents binding an expression to a temporary,
@@ -445,7 +447,8 @@
void Destroy(ASTContext &C);
CXXTemporary *getTemporary() { return Temp; }
-
+ const CXXTemporary *getTemporary() const { return Temp; }
+
const Expr *getSubExpr() const { return cast<Expr>(SubExpr); }
Expr *getSubExpr() { return cast<Expr>(SubExpr); }
void setSubExpr(Expr *E) { SubExpr = E; }
@@ -1035,10 +1038,15 @@
assert(i < NumTemps && "Index out of range");
return Temps[i];
}
+ const CXXTemporary *getTemporary(unsigned i) const {
+ assert(i < NumTemps && "Index out of range");
+ return Temps[i];
+ }
+
void removeLastTemporary() { NumTemps--; }
- const Expr *getSubExpr() const { return cast<Expr>(SubExpr); }
Expr *getSubExpr() { return cast<Expr>(SubExpr); }
+ const Expr *getSubExpr() const { return cast<Expr>(SubExpr); }
void setSubExpr(Expr *E) { SubExpr = E; }
virtual SourceRange getSourceRange() const { return SourceRange(); }
More information about the cfe-commits
mailing list