Move the type checking that Sema::ActOnCastExpr does into a new Sema::CheckCastTypes function so that it can be reused.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54852 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/Sema.h b/lib/Sema/Sema.h
index 98f98aa..ed01085 100644
--- a/lib/Sema/Sema.h
+++ b/lib/Sema/Sema.h
@@ -869,6 +869,9 @@
   
   StringLiteral *IsStringLiteralInit(Expr *Init, QualType DeclType);
   bool CheckStringLiteralInit(StringLiteral *strLiteral, QualType &DeclT);
+
+  /// CheckCastTypes - Check type constraints for casting between types.
+  bool CheckCastTypes(SourceRange TyRange, QualType CastTy, Expr *CastExpr);
   
   // CheckVectorCast - check type constraints for vectors. 
   // Since vectors are an extension, there are no C standard reference for this.