[cfe-commits] [patch] CXXNamedCastExpr
Zhongxing Xu
xuzhongxing at gmail.com
Tue Apr 20 22:55:34 PDT 2010
CXXNamedCastExpr is actually an abstract expression.
Index: include/clang/AST/Expr.h
===================================================================
--- include/clang/AST/Expr.h (版本 101983)
+++ include/clang/AST/Expr.h (工作副本)
@@ -1679,7 +1679,7 @@
static bool classof(const Stmt *T) {
StmtClass SC = T->getStmtClass();
- if (SC >= CXXNamedCastExprClass && SC <= CXXFunctionalCastExprClass)
+ if (SC >= CXXStaticCastExprClass && SC <= CXXFunctionalCastExprClass)
return true;
if (SC >= ImplicitCastExprClass && SC <= CStyleCastExprClass)
@@ -1783,7 +1783,7 @@
StmtClass SC = T->getStmtClass();
if (SC >= CStyleCastExprClass && SC <= CStyleCastExprClass)
return true;
- if (SC >= CXXNamedCastExprClass && SC <= CXXFunctionalCastExprClass)
+ if (SC >= CXXStaticCastExprClass && SC <= CXXFunctionalCastExprClass)
return true;
return false;
Index: include/clang/AST/StmtNodes.def
===================================================================
--- include/clang/AST/StmtNodes.def (版本 101983)
+++ include/clang/AST/StmtNodes.def (工作副本)
@@ -107,7 +107,7 @@
// C++ Expressions.
EXPR(CXXOperatorCallExpr , CallExpr)
EXPR(CXXMemberCallExpr , CallExpr)
-EXPR(CXXNamedCastExpr , ExplicitCastExpr)
+ABSTRACT_EXPR(CXXNamedCastExpr , ExplicitCastExpr)
EXPR(CXXStaticCastExpr , CXXNamedCastExpr)
EXPR(CXXDynamicCastExpr , CXXNamedCastExpr)
EXPR(CXXReinterpretCastExpr , CXXNamedCastExpr)
Index: include/clang/AST/ExprCXX.h
===================================================================
--- include/clang/AST/ExprCXX.h (版本 101983)
+++ include/clang/AST/ExprCXX.h (工作副本)
@@ -137,7 +137,6 @@
}
static bool classof(const Stmt *T) {
switch (T->getStmtClass()) {
- case CXXNamedCastExprClass:
case CXXStaticCastExprClass:
case CXXDynamicCastExprClass:
case CXXReinterpretCastExprClass:
Index: tools/CIndex/CXCursor.cpp
===================================================================
--- tools/CIndex/CXCursor.cpp (版本 101983)
+++ tools/CIndex/CXCursor.cpp (工作副本)
@@ -160,7 +160,6 @@
case Stmt::TypesCompatibleExprClass:
case Stmt::ChooseExprClass:
case Stmt::GNUNullExprClass:
- case Stmt::CXXNamedCastExprClass:
case Stmt::CXXStaticCastExprClass:
case Stmt::CXXDynamicCastExprClass:
case Stmt::CXXReinterpretCastExprClass:
Index: lib/Sema/TreeTransform.h
===================================================================
--- lib/Sema/TreeTransform.h (版本 101983)
+++ lib/Sema/TreeTransform.h (工作副本)
@@ -338,6 +338,7 @@
QualType ObjectType);
OwningStmtResult TransformCompoundStmt(CompoundStmt *S, bool IsStmtExpr);
+ OwningExprResult TransformCXXNamedCastExpr(CXXNamedCastExpr *E);
#define STMT(Node, Parent) \
OwningStmtResult Transform##Node(Node *S);
@@ -346,6 +347,7 @@
#define ABSTRACT_EXPR(Node, Parent)
#include "clang/AST/StmtNodes.def"
+
/// \brief Build a new pointer type given its pointee type.
///
/// By default, performs semantic analysis when building the pointer
type.
Index: lib/AST/Expr.cpp
===================================================================
--- lib/AST/Expr.cpp (版本 101983)
+++ lib/AST/Expr.cpp (工作副本)
@@ -1999,7 +1999,6 @@
case Expr::ImplicitCastExprClass:
case Expr::CStyleCastExprClass:
case Expr::CXXFunctionalCastExprClass:
- case Expr::CXXNamedCastExprClass:
case Expr::CXXStaticCastExprClass:
case Expr::CXXReinterpretCastExprClass:
case Expr::CXXConstCastExprClass: {
Index: lib/Checker/GRExprEngine.cpp
===================================================================
--- lib/Checker/GRExprEngine.cpp (版本 101983)
+++ lib/Checker/GRExprEngine.cpp (工作副本)
@@ -591,7 +591,6 @@
case Stmt::CXXDefaultArgExprClass:
case Stmt::CXXDependentScopeMemberExprClass:
case Stmt::CXXExprWithTemporariesClass:
- case Stmt::CXXNamedCastExprClass:
case Stmt::CXXNullPtrLiteralExprClass:
case Stmt::CXXPseudoDestructorExprClass:
case Stmt::CXXTemporaryObjectExprClass:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20100421/d9278a93/attachment.html>
More information about the cfe-commits
mailing list