From a70ad93f8a487fded82f334c34604b71a8dcff2d Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Thu, 12 Nov 2009 16:43:42 +0000 Subject: [PATCH] Add a CK_BaseToDerived cast kind. llvm-svn: 86994 --- clang/include/clang/AST/Expr.h | 3 +++ clang/lib/AST/Expr.cpp | 2 ++ 2 files changed, 5 insertions(+) diff --git a/clang/include/clang/AST/Expr.h b/clang/include/clang/AST/Expr.h index 67f04b6a0cf9..57c3a1291a04 100644 --- a/clang/include/clang/AST/Expr.h +++ b/clang/include/clang/AST/Expr.h @@ -1519,6 +1519,9 @@ public: /// CK_NoOp - Used for const_cast. CK_NoOp, + /// CK_BaseToDerived - Base to derived class casts. + CK_BaseToDerived, + /// CK_DerivedToBase - Derived to base class casts. CK_DerivedToBase, diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp index a8ea752a4a7e..d43d58aee9ce 100644 --- a/clang/lib/AST/Expr.cpp +++ b/clang/lib/AST/Expr.cpp @@ -490,6 +490,8 @@ const char *CastExpr::getCastKindName() const { return "BitCast"; case CastExpr::CK_NoOp: return "NoOp"; + case CastExpr::CK_BaseToDerived: + return "BaseToDerived"; case CastExpr::CK_DerivedToBase: return "DerivedToBase"; case CastExpr::CK_Dynamic: