Remove tabs, and whitespace cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaCXXCast.cpp b/lib/Sema/SemaCXXCast.cpp
index ceb2de7..ac85b79 100644
--- a/lib/Sema/SemaCXXCast.cpp
+++ b/lib/Sema/SemaCXXCast.cpp
@@ -47,7 +47,7 @@
                             CastExpr::CastKind &Kind);
 static void CheckDynamicCast(Sema &Self, Expr *&SrcExpr, QualType DestType,
                              const SourceRange &OpRange,
-                             const SourceRange &DestRange, 
+                             const SourceRange &DestRange,
                              CastExpr::CastKind &Kind);
 
 static bool CastsAwayConstness(Sema &Self, QualType SrcType, QualType DestType);
@@ -89,7 +89,7 @@
                                            CXXMethodDecl *&ConversionDecl);
 static TryCastResult TryStaticCast(Sema &Self, Expr *SrcExpr,
                                    QualType DestType, bool CStyle,
-                                   CastExpr::CastKind &Kind, 
+                                   CastExpr::CastKind &Kind,
                                    const SourceRange &OpRange,
                                    unsigned &msg,
                                    CXXMethodDecl *&ConversionDecl);
@@ -97,7 +97,7 @@
                                   bool CStyle, unsigned &msg);
 static TryCastResult TryReinterpretCast(Sema &Self, Expr *SrcExpr,
                                         QualType DestType, bool CStyle,
-                                        CastExpr::CastKind &Kind, 
+                                        CastExpr::CastKind &Kind,
                                         const SourceRange &OpRange,
                                         unsigned &msg);
 
@@ -158,8 +158,7 @@
 /// the cast checkers.  Both arguments must denote pointer (possibly to member)
 /// types.
 bool
-CastsAwayConstness(Sema &Self, QualType SrcType, QualType DestType)
-{
+CastsAwayConstness(Sema &Self, QualType SrcType, QualType DestType) {
   // Casting away constness is defined in C++ 5.2.11p8 with reference to
   // C++ 4.4. We piggyback on Sema::IsQualificationConversion for this, since
   // the rules are non-trivial. So first we construct Tcv *...cv* as described
@@ -185,8 +184,7 @@
   QualType DestConstruct = Self.Context.VoidTy;
   for (llvm::SmallVector<unsigned, 8>::reverse_iterator i1 = cv1.rbegin(),
                                                         i2 = cv2.rbegin();
-       i1 != cv1.rend(); ++i1, ++i2)
-  {
+       i1 != cv1.rend(); ++i1, ++i2) {
     SrcConstruct = Self.Context.getPointerType(
       SrcConstruct.getQualifiedType(*i1));
     DestConstruct = Self.Context.getPointerType(
@@ -204,8 +202,7 @@
 static void
 CheckDynamicCast(Sema &Self, Expr *&SrcExpr, QualType DestType,
                  const SourceRange &OpRange,
-                 const SourceRange &DestRange, CastExpr::CastKind &Kind)
-{
+                 const SourceRange &DestRange, CastExpr::CastKind &Kind) {
   QualType OrigDestType = DestType, OrigSrcType = SrcExpr->getType();
   DestType = Self.Context.getCanonicalType(DestType);
 
@@ -325,8 +322,7 @@
 /// legacy_function(const_cast\<char*\>(str));
 void
 CheckConstCast(Sema &Self, Expr *&SrcExpr, QualType DestType,
-               const SourceRange &OpRange, const SourceRange &DestRange)
-{
+               const SourceRange &OpRange, const SourceRange &DestRange) {
   if (!DestType->isLValueReferenceType())
     Self.DefaultFunctionArrayConversion(SrcExpr);
 
@@ -344,8 +340,7 @@
 /// char *bytes = reinterpret_cast\<char*\>(int_ptr);
 void
 CheckReinterpretCast(Sema &Self, Expr *&SrcExpr, QualType DestType,
-                     const SourceRange &OpRange, const SourceRange &DestRange)
-{
+                     const SourceRange &OpRange, const SourceRange &DestRange) {
   if (!DestType->isLValueReferenceType())
     Self.DefaultFunctionArrayConversion(SrcExpr);
 
@@ -364,8 +359,7 @@
 /// implicit conversions explicit and getting rid of data loss warnings.
 void
 CheckStaticCast(Sema &Self, Expr *&SrcExpr, QualType DestType,
-                const SourceRange &OpRange, CastExpr::CastKind &Kind)
-{
+                const SourceRange &OpRange, CastExpr::CastKind &Kind) {
   // This test is outside everything else because it's the only case where
   // a non-lvalue-reference target type does not lead to decay.
   // C++ 5.2.9p4: Any expression can be explicitly converted to type "cv void".
@@ -378,7 +372,7 @@
 
   unsigned msg = diag::err_bad_cxx_cast_generic;
   CXXMethodDecl *ConversionDecl = 0;
-  if (TryStaticCast(Self, SrcExpr, DestType, /*CStyle*/false, Kind, 
+  if (TryStaticCast(Self, SrcExpr, DestType, /*CStyle*/false, Kind,
                     OpRange, msg, ConversionDecl)
       != TC_Success && msg != 0)
     Self.Diag(OpRange.getBegin(), msg) << CT_Static
@@ -390,10 +384,9 @@
 /// and casting away constness.
 static TryCastResult TryStaticCast(Sema &Self, Expr *SrcExpr,
                                    QualType DestType, bool CStyle,
-                                   CastExpr::CastKind &Kind, 
+                                   CastExpr::CastKind &Kind,
                                    const SourceRange &OpRange, unsigned &msg,
-                                   CXXMethodDecl *&ConversionDecl)
-{
+                                   CXXMethodDecl *&ConversionDecl) {
   // The order the tests is not entirely arbitrary. There is one conversion
   // that can be handled in two different ways. Given:
   // struct A {};
@@ -500,8 +493,7 @@
 /// Tests whether a conversion according to N2844 is valid.
 TryCastResult
 TryLValueToRValueCast(Sema &Self, Expr *SrcExpr, QualType DestType,
-                      unsigned &msg)
-{
+                      unsigned &msg) {
   // N2844 5.2.9p3: An lvalue of type "cv1 T1" can be cast to type "rvalue
   //   reference to cv2 T2" if "cv2 T2" is reference-compatible with "cv1 T1".
   const RValueReferenceType *R = DestType->getAs<RValueReferenceType>();
@@ -531,8 +523,7 @@
 TryCastResult
 TryStaticReferenceDowncast(Sema &Self, Expr *SrcExpr, QualType DestType,
                            bool CStyle, const SourceRange &OpRange,
-                           unsigned &msg)
-{
+                           unsigned &msg) {
   // C++ 5.2.9p5: An lvalue of type "cv1 B", where B is a class type, can be
   //   cast to type "reference to cv2 D", where D is a class derived from B,
   //   if a valid standard conversion from "pointer to D" to "pointer to B"
@@ -562,8 +553,8 @@
 /// Tests whether a conversion according to C++ 5.2.9p8 is valid.
 TryCastResult
 TryStaticPointerDowncast(Sema &Self, QualType SrcType, QualType DestType,
-                         bool CStyle, const SourceRange &OpRange, unsigned &msg)
-{
+                         bool CStyle, const SourceRange &OpRange,
+                         unsigned &msg) {
   // C++ 5.2.9p8: An rvalue of type "pointer to cv1 B", where B is a class
   //   type, can be converted to an rvalue of type "pointer to cv2 D", where D
   //   is a class derived from B, if a valid standard conversion from "pointer
@@ -594,8 +585,7 @@
 TryCastResult
 TryStaticDowncast(Sema &Self, QualType SrcType, QualType DestType,
                   bool CStyle, const SourceRange &OpRange, QualType OrigSrcType,
-                  QualType OrigDestType, unsigned &msg)
-{
+                  QualType OrigDestType, unsigned &msg) {
   // Downcast can only happen in class hierarchies, so we need classes.
   if (!DestType->isRecordType() || !SrcType->isRecordType()) {
     return TC_NotApplicable;
@@ -614,7 +604,7 @@
   // struct B : virtual A {
   //   B(A&);
   // };
-  // 
+  //
   // void f()
   // {
   //   (void)static_cast<const B&>(*((A*)0));
@@ -691,8 +681,7 @@
 TryCastResult
 TryStaticMemberPointerUpcast(Sema &Self, QualType SrcType, QualType DestType,
                              bool CStyle, const SourceRange &OpRange,
-                             unsigned &msg)
-{
+                             unsigned &msg) {
   const MemberPointerType *DestMemPtr = DestType->getAs<MemberPointerType>();
   if (!DestMemPtr)
     return TC_NotApplicable;
@@ -757,8 +746,7 @@
 TryCastResult
 TryStaticImplicitCast(Sema &Self, Expr *SrcExpr, QualType DestType,
                       bool CStyle, const SourceRange &OpRange, unsigned &msg,
-                      CXXMethodDecl *&ConversionDecl)
-{
+                      CXXMethodDecl *&ConversionDecl) {
   if (DestType->isRecordType()) {
     if (Self.RequireCompleteType(OpRange.getBegin(), DestType,
                                  diag::err_bad_dynamic_cast_incomplete)) {
@@ -766,7 +754,7 @@
       return TC_Failed;
     }
   }
-  
+
   if (DestType->isReferenceType()) {
     // At this point of CheckStaticCast, if the destination is a reference,
     // this has to work. There is no other way that works.
@@ -774,7 +762,7 @@
     // the reinterpret_cast way. In that case, we pass an ICS so we don't
     // get error messages.
     ImplicitConversionSequence ICS;
-    bool failed = Self.CheckReferenceInit(SrcExpr, DestType, 
+    bool failed = Self.CheckReferenceInit(SrcExpr, DestType,
                                           /*SuppressUserConversions=*/false,
                                           /*AllowExplicit=*/false,
                                           /*ForceRValue=*/false,
@@ -792,15 +780,15 @@
   // reimplement more of this.
   // FIXME: This does not actually perform the conversion, and thus does not
   // check for ambiguity or access.
-  ImplicitConversionSequence ICS = 
+  ImplicitConversionSequence ICS =
     Self.TryImplicitConversion(SrcExpr, DestType,
                                /*SuppressUserConversions=*/false,
                                /*AllowExplicit=*/true,
                                /*ForceRValue=*/false,
                                /*InOverloadResolution=*/false);
-  
+
   if (ICS.ConversionKind  == ImplicitConversionSequence::UserDefinedConversion)
-    if (CXXMethodDecl *MD = 
+    if (CXXMethodDecl *MD =
           dyn_cast<CXXMethodDecl>(ICS.UserDefined.ConversionFunction))
       ConversionDecl = MD;
   return ICS.ConversionKind == ImplicitConversionSequence::BadConversion ?
@@ -1032,8 +1020,7 @@
 
 bool Sema::CXXCheckCStyleCast(SourceRange R, QualType CastTy, Expr *&CastExpr,
                               CastExpr::CastKind &Kind, bool FunctionalStyle,
-                              CXXMethodDecl *&ConversionDecl)
-{
+                              CXXMethodDecl *&ConversionDecl) {
   // This test is outside everything else because it's the only case where
   // a non-lvalue-reference target type does not lead to decay.
   // C++ 5.2.9p4: Any expression can be explicitly converted to type "cv void".
@@ -1067,7 +1054,7 @@
                         ConversionDecl);
     if (tcr == TC_NotApplicable) {
       // ... and finally a reinterpret_cast, ignoring const.
-      tcr = TryReinterpretCast(*this, CastExpr, CastTy, /*CStyle*/true, Kind, 
+      tcr = TryReinterpretCast(*this, CastExpr, CastTy, /*CStyle*/true, Kind,
                                R, msg);
     }
   }