[cfe-commits] r101994 - in /cfe/trunk: include/clang/AST/Expr.h include/clang/AST/ExprCXX.h include/clang/AST/StmtNodes.def lib/AST/Expr.cpp lib/Checker/GRExprEngine.cpp lib/Sema/TreeTransform.h tools/CIndex/CXCursor.cpp

Zhongxing Xu xuzhongxing at gmail.com
Tue Apr 20 23:32:25 PDT 2010


Author: zhongxingxu
Date: Wed Apr 21 01:32:25 2010
New Revision: 101994

URL: http://llvm.org/viewvc/llvm-project?rev=101994&view=rev
Log:
CXXNamedCastExpr is actually an abstract expression.

Modified:
    cfe/trunk/include/clang/AST/Expr.h
    cfe/trunk/include/clang/AST/ExprCXX.h
    cfe/trunk/include/clang/AST/StmtNodes.def
    cfe/trunk/lib/AST/Expr.cpp
    cfe/trunk/lib/Checker/GRExprEngine.cpp
    cfe/trunk/lib/Sema/TreeTransform.h
    cfe/trunk/tools/CIndex/CXCursor.cpp

Modified: cfe/trunk/include/clang/AST/Expr.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Expr.h?rev=101994&r1=101993&r2=101994&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Expr.h (original)
+++ cfe/trunk/include/clang/AST/Expr.h Wed Apr 21 01:32:25 2010
@@ -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;

Modified: cfe/trunk/include/clang/AST/ExprCXX.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ExprCXX.h?rev=101994&r1=101993&r2=101994&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/ExprCXX.h (original)
+++ cfe/trunk/include/clang/AST/ExprCXX.h Wed Apr 21 01:32:25 2010
@@ -137,7 +137,6 @@
   }
   static bool classof(const Stmt *T) {
     switch (T->getStmtClass()) {
-    case CXXNamedCastExprClass:
     case CXXStaticCastExprClass:
     case CXXDynamicCastExprClass:
     case CXXReinterpretCastExprClass:

Modified: cfe/trunk/include/clang/AST/StmtNodes.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/StmtNodes.def?rev=101994&r1=101993&r2=101994&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/StmtNodes.def (original)
+++ cfe/trunk/include/clang/AST/StmtNodes.def Wed Apr 21 01:32:25 2010
@@ -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)

Modified: cfe/trunk/lib/AST/Expr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Expr.cpp?rev=101994&r1=101993&r2=101994&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Expr.cpp (original)
+++ cfe/trunk/lib/AST/Expr.cpp Wed Apr 21 01:32:25 2010
@@ -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: {

Modified: cfe/trunk/lib/Checker/GRExprEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/GRExprEngine.cpp?rev=101994&r1=101993&r2=101994&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/GRExprEngine.cpp (original)
+++ cfe/trunk/lib/Checker/GRExprEngine.cpp Wed Apr 21 01:32:25 2010
@@ -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:

Modified: cfe/trunk/lib/Sema/TreeTransform.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/TreeTransform.h?rev=101994&r1=101993&r2=101994&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/TreeTransform.h (original)
+++ cfe/trunk/lib/Sema/TreeTransform.h Wed Apr 21 01:32:25 2010
@@ -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);

Modified: cfe/trunk/tools/CIndex/CXCursor.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/CIndex/CXCursor.cpp?rev=101994&r1=101993&r2=101994&view=diff
==============================================================================
--- cfe/trunk/tools/CIndex/CXCursor.cpp (original)
+++ cfe/trunk/tools/CIndex/CXCursor.cpp Wed Apr 21 01:32:25 2010
@@ -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: 





More information about the cfe-commits mailing list