Implement semantic checking of static_cast and dynamic_cast.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58509 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/Sema.h b/lib/Sema/Sema.h
index 2a49e71..4ff5ce6 100644
--- a/lib/Sema/Sema.h
+++ b/lib/Sema/Sema.h
@@ -707,13 +707,22 @@
SourceLocation LParenLoc, ExprTy *E,
SourceLocation RParenLoc);
+private:
// Helpers for ActOnCXXCasts
- bool CastsAwayConstness(QualType SrcType, QualType DestType);
void CheckConstCast(SourceLocation OpLoc, Expr *&SrcExpr, QualType DestType);
void CheckReinterpretCast(SourceLocation OpLoc, Expr *&SrcExpr,
QualType DestType);
void CheckStaticCast(SourceLocation OpLoc, Expr *&SrcExpr, QualType DestType);
+ void CheckDynamicCast(SourceLocation OpLoc, Expr *&SrcExpr,
+ QualType DestType, const SourceRange &DestRange);
+ bool CastsAwayConstness(QualType SrcType, QualType DestType);
+ bool IsStaticReferenceDowncast(Expr *SrcExpr, QualType DestType);
+ bool IsStaticPointerDowncast(QualType SrcType, QualType DestType);
+ bool IsStaticDowncast(QualType SrcType, QualType DestType);
+ ImplicitConversionSequence TryDirectInitialization(Expr *SrcExpr,
+ QualType DestType);
+public:
//// ActOnCXXThis - Parse 'this' pointer.
virtual ExprResult ActOnCXXThis(SourceLocation ThisLoc);