[cfe-commits] [patch] CXXNamedCastExpr
Douglas Gregor
dgregor at apple.com
Tue Apr 20 23:25:01 PDT 2010
On Apr 20, 2010, at 10:55 PM, Zhongxing Xu wrote:
> CXXNamedCastExpr is actually an abstract expression.
Yes, you're right. Thanks, please apply!
- Doug
> 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:
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list