Remove trailing space

sed -Ei 's/[[:space:]]+$//' include/**/*.{def,h,td} lib/**/*.{cpp,h}

llvm-svn: 338291
diff --git a/clang/lib/AST/RecordLayoutBuilder.cpp b/clang/lib/AST/RecordLayoutBuilder.cpp
index c92ac20..dd58b10 100644
--- a/clang/lib/AST/RecordLayoutBuilder.cpp
+++ b/clang/lib/AST/RecordLayoutBuilder.cpp
@@ -105,7 +105,7 @@
 class EmptySubobjectMap {
   const ASTContext &Context;
   uint64_t CharWidth;
-  
+
   /// Class - The class whose empty entries we're keeping track of.
   const CXXRecordDecl *Class;
 
@@ -113,35 +113,35 @@
   typedef llvm::TinyPtrVector<const CXXRecordDecl *> ClassVectorTy;
   typedef llvm::DenseMap<CharUnits, ClassVectorTy> EmptyClassOffsetsMapTy;
   EmptyClassOffsetsMapTy EmptyClassOffsets;
-  
+
   /// MaxEmptyClassOffset - The highest offset known to contain an empty
   /// base subobject.
   CharUnits MaxEmptyClassOffset;
-  
+
   /// ComputeEmptySubobjectSizes - Compute the size of the largest base or
   /// member subobject that is empty.
   void ComputeEmptySubobjectSizes();
-  
+
   void AddSubobjectAtOffset(const CXXRecordDecl *RD, CharUnits Offset);
-  
+
   void UpdateEmptyBaseSubobjects(const BaseSubobjectInfo *Info,
                                  CharUnits Offset, bool PlacingEmptyBase);
-  
-  void UpdateEmptyFieldSubobjects(const CXXRecordDecl *RD, 
+
+  void UpdateEmptyFieldSubobjects(const CXXRecordDecl *RD,
                                   const CXXRecordDecl *Class,
                                   CharUnits Offset);
   void UpdateEmptyFieldSubobjects(const FieldDecl *FD, CharUnits Offset);
-  
+
   /// AnyEmptySubobjectsBeyondOffset - Returns whether there are any empty
   /// subobjects beyond the given offset.
   bool AnyEmptySubobjectsBeyondOffset(CharUnits Offset) const {
     return Offset <= MaxEmptyClassOffset;
   }
 
-  CharUnits 
+  CharUnits
   getFieldOffset(const ASTRecordLayout &Layout, unsigned FieldNo) const {
     uint64_t FieldOffset = Layout.getFieldOffset(FieldNo);
-    assert(FieldOffset % CharWidth == 0 && 
+    assert(FieldOffset % CharWidth == 0 &&
            "Field offset not at char boundary!");
 
     return Context.toCharUnitsFromBits(FieldOffset);
@@ -154,7 +154,7 @@
   bool CanPlaceBaseSubobjectAtOffset(const BaseSubobjectInfo *Info,
                                      CharUnits Offset);
 
-  bool CanPlaceFieldSubobjectAtOffset(const CXXRecordDecl *RD, 
+  bool CanPlaceFieldSubobjectAtOffset(const CXXRecordDecl *RD,
                                       const CXXRecordDecl *Class,
                                       CharUnits Offset) const;
   bool CanPlaceFieldSubobjectAtOffset(const FieldDecl *FD,
@@ -228,7 +228,7 @@
 }
 
 bool
-EmptySubobjectMap::CanPlaceSubobjectAtOffset(const CXXRecordDecl *RD, 
+EmptySubobjectMap::CanPlaceSubobjectAtOffset(const CXXRecordDecl *RD,
                                              CharUnits Offset) const {
   // We only need to check empty bases.
   if (!RD->isEmpty())
@@ -245,8 +245,8 @@
   // There is already an empty class of the same type at this offset.
   return false;
 }
-  
-void EmptySubobjectMap::AddSubobjectAtOffset(const CXXRecordDecl *RD, 
+
+void EmptySubobjectMap::AddSubobjectAtOffset(const CXXRecordDecl *RD,
                                              CharUnits Offset) {
   // We only care about empty bases.
   if (!RD->isEmpty())
@@ -257,9 +257,9 @@
   ClassVectorTy &Classes = EmptyClassOffsets[Offset];
   if (std::find(Classes.begin(), Classes.end(), RD) != Classes.end())
     return;
-  
+
   Classes.push_back(RD);
-  
+
   // Update the empty class offset.
   if (Offset > MaxEmptyClassOffset)
     MaxEmptyClassOffset = Offset;
@@ -296,10 +296,10 @@
         return false;
     }
   }
-  
+
   // Traverse all member variables.
   unsigned FieldNo = 0;
-  for (CXXRecordDecl::field_iterator I = Info->Class->field_begin(), 
+  for (CXXRecordDecl::field_iterator I = Info->Class->field_begin(),
        E = Info->Class->field_end(); I != E; ++I, ++FieldNo) {
     if (I->isBitField())
       continue;
@@ -312,15 +312,15 @@
   return true;
 }
 
-void EmptySubobjectMap::UpdateEmptyBaseSubobjects(const BaseSubobjectInfo *Info, 
+void EmptySubobjectMap::UpdateEmptyBaseSubobjects(const BaseSubobjectInfo *Info,
                                                   CharUnits Offset,
                                                   bool PlacingEmptyBase) {
   if (!PlacingEmptyBase && Offset >= SizeOfLargestEmptySubobject) {
     // We know that the only empty subobjects that can conflict with empty
     // subobject of non-empty bases, are empty bases that can be placed at
-    // offset zero. Because of this, we only need to keep track of empty base 
+    // offset zero. Because of this, we only need to keep track of empty base
     // subobjects with offsets less than the size of the largest empty
-    // subobject for our class.    
+    // subobject for our class.
     return;
   }
 
@@ -338,7 +338,7 @@
 
   if (Info->PrimaryVirtualBaseInfo) {
     BaseSubobjectInfo *PrimaryVirtualBaseInfo = Info->PrimaryVirtualBaseInfo;
-    
+
     if (Info == PrimaryVirtualBaseInfo->Derived)
       UpdateEmptyBaseSubobjects(PrimaryVirtualBaseInfo, Offset,
                                 PlacingEmptyBase);
@@ -346,7 +346,7 @@
 
   // Traverse all member variables.
   unsigned FieldNo = 0;
-  for (CXXRecordDecl::field_iterator I = Info->Class->field_begin(), 
+  for (CXXRecordDecl::field_iterator I = Info->Class->field_begin(),
        E = Info->Class->field_end(); I != E; ++I, ++FieldNo) {
     if (I->isBitField())
       continue;
@@ -373,7 +373,7 @@
 }
 
 bool
-EmptySubobjectMap::CanPlaceFieldSubobjectAtOffset(const CXXRecordDecl *RD, 
+EmptySubobjectMap::CanPlaceFieldSubobjectAtOffset(const CXXRecordDecl *RD,
                                                   const CXXRecordDecl *Class,
                                                   CharUnits Offset) const {
   // We don't have to keep looking past the maximum offset that's known to
@@ -383,7 +383,7 @@
 
   if (!CanPlaceSubobjectAtOffset(RD, Offset))
     return false;
-  
+
   const ASTRecordLayout &Layout = Context.getASTRecordLayout(RD);
 
   // Traverse all non-virtual bases.
@@ -408,7 +408,7 @@
         return false;
     }
   }
-    
+
   // Traverse all member variables.
   unsigned FieldNo = 0;
   for (CXXRecordDecl::field_iterator I = RD->field_begin(), E = RD->field_end();
@@ -417,7 +417,7 @@
       continue;
 
     CharUnits FieldOffset = Offset + getFieldOffset(Layout, FieldNo);
-    
+
     if (!CanPlaceFieldSubobjectAtOffset(*I, FieldOffset))
       return false;
   }
@@ -432,7 +432,7 @@
   // contain an empty class.
   if (!AnyEmptySubobjectsBeyondOffset(Offset))
     return true;
-  
+
   QualType T = FD->getType();
   if (const CXXRecordDecl *RD = T->getAsCXXRecordDecl())
     return CanPlaceFieldSubobjectAtOffset(RD, RD, Offset);
@@ -454,7 +454,7 @@
       // contain an empty class.
       if (!AnyEmptySubobjectsBeyondOffset(ElementOffset))
         return true;
-      
+
       if (!CanPlaceFieldSubobjectAtOffset(RD, RD, ElementOffset))
         return false;
 
@@ -466,23 +466,23 @@
 }
 
 bool
-EmptySubobjectMap::CanPlaceFieldAtOffset(const FieldDecl *FD, 
+EmptySubobjectMap::CanPlaceFieldAtOffset(const FieldDecl *FD,
                                          CharUnits Offset) {
   if (!CanPlaceFieldSubobjectAtOffset(FD, Offset))
     return false;
-  
+
   // We are able to place the member variable at this offset.
   // Make sure to update the empty base subobject map.
   UpdateEmptyFieldSubobjects(FD, Offset);
   return true;
 }
 
-void EmptySubobjectMap::UpdateEmptyFieldSubobjects(const CXXRecordDecl *RD, 
+void EmptySubobjectMap::UpdateEmptyFieldSubobjects(const CXXRecordDecl *RD,
                                                    const CXXRecordDecl *Class,
                                                    CharUnits Offset) {
   // We know that the only empty subobjects that can conflict with empty
   // field subobjects are subobjects of empty bases that can be placed at offset
-  // zero. Because of this, we only need to keep track of empty field 
+  // zero. Because of this, we only need to keep track of empty field
   // subobjects with offsets less than the size of the largest empty
   // subobject for our class.
   if (Offset >= SizeOfLargestEmptySubobject)
@@ -512,7 +512,7 @@
       UpdateEmptyFieldSubobjects(VBaseDecl, Class, VBaseOffset);
     }
   }
-  
+
   // Traverse all member variables.
   unsigned FieldNo = 0;
   for (CXXRecordDecl::field_iterator I = RD->field_begin(), E = RD->field_end();
@@ -525,7 +525,7 @@
     UpdateEmptyFieldSubobjects(*I, FieldOffset);
   }
 }
-  
+
 void EmptySubobjectMap::UpdateEmptyFieldSubobjects(const FieldDecl *FD,
                                                    CharUnits Offset) {
   QualType T = FD->getType();
@@ -543,13 +543,13 @@
 
     const CXXRecordDecl *RD = RT->getAsCXXRecordDecl();
     const ASTRecordLayout &Layout = Context.getASTRecordLayout(RD);
-    
+
     uint64_t NumElements = Context.getConstantArrayElementCount(AT);
     CharUnits ElementOffset = Offset;
-    
+
     for (uint64_t I = 0; I != NumElements; ++I) {
       // We know that the only empty subobjects that can conflict with empty
-      // field subobjects are subobjects of empty bases that can be placed at 
+      // field subobjects are subobjects of empty bases that can be placed at
       // offset zero. Because of this, we only need to keep track of empty field
       // subobjects with offsets less than the size of the largest empty
       // subobject for our class.
@@ -591,17 +591,17 @@
   /// record.
   unsigned UseExternalLayout : 1;
 
-  /// Whether we need to infer alignment, even when we have an 
+  /// Whether we need to infer alignment, even when we have an
   /// externally-provided layout.
   unsigned InferAlignment : 1;
-  
+
   /// Packed - Whether the record is packed or not.
   unsigned Packed : 1;
 
   unsigned IsUnion : 1;
 
   unsigned IsMac68kAlign : 1;
-  
+
   unsigned IsMsStruct : 1;
 
   /// UnfilledBitsInLastUnit - If the last field laid out was a bitfield,
@@ -691,14 +691,14 @@
 
   /// BaseSubobjectInfoAllocator - Allocator for BaseSubobjectInfo objects.
   llvm::SpecificBumpPtrAllocator<BaseSubobjectInfo> BaseSubobjectInfoAllocator;
-  
+
   typedef llvm::DenseMap<const CXXRecordDecl *, BaseSubobjectInfo *>
     BaseSubobjectInfoMapTy;
 
   /// VirtualBaseInfo - Map from all the (direct or indirect) virtual bases
   /// of the class we're laying out to their base subobject info.
   BaseSubobjectInfoMapTy VirtualBaseInfo;
-  
+
   /// NonVirtualBaseInfo - Map from all the direct non-virtual bases of the
   /// class we're laying out to their base subobject info.
   BaseSubobjectInfoMapTy NonVirtualBaseInfo;
@@ -709,7 +709,7 @@
 
   /// ComputeBaseSubobjectInfo - Compute the base subobject information for a
   /// single class and all of its base classes.
-  BaseSubobjectInfo *ComputeBaseSubobjectInfo(const CXXRecordDecl *RD, 
+  BaseSubobjectInfo *ComputeBaseSubobjectInfo(const CXXRecordDecl *RD,
                                               bool IsVirtual,
                                               BaseSubobjectInfo *Derived);
 
@@ -758,18 +758,18 @@
   ///
   /// \param Field The field whose offset is being queried.
   /// \param ComputedOffset The offset that we've computed for this field.
-  uint64_t updateExternalFieldOffset(const FieldDecl *Field, 
+  uint64_t updateExternalFieldOffset(const FieldDecl *Field,
                                      uint64_t ComputedOffset);
-  
+
   void CheckFieldPadding(uint64_t Offset, uint64_t UnpaddedOffset,
                           uint64_t UnpackedOffset, unsigned UnpackedAlign,
                           bool isPacked, const FieldDecl *D);
 
   DiagnosticBuilder Diag(SourceLocation Loc, unsigned DiagID);
 
-  CharUnits getSize() const { 
+  CharUnits getSize() const {
     assert(Size % Context.getCharWidth() == 0);
-    return Context.toCharUnitsFromBits(Size); 
+    return Context.toCharUnitsFromBits(Size);
   }
   uint64_t getSizeInBits() const { return Size; }
 
@@ -778,9 +778,9 @@
 
   CharUnits getAligment() const { return Alignment; }
 
-  CharUnits getDataSize() const { 
+  CharUnits getDataSize() const {
     assert(DataSize % Context.getCharWidth() == 0);
-    return Context.toCharUnitsFromBits(DataSize); 
+    return Context.toCharUnitsFromBits(DataSize);
   }
   uint64_t getDataSizeInBits() const { return DataSize; }
 
@@ -871,7 +871,7 @@
 BaseSubobjectInfo *ItaniumRecordLayoutBuilder::ComputeBaseSubobjectInfo(
     const CXXRecordDecl *RD, bool IsVirtual, BaseSubobjectInfo *Derived) {
   BaseSubobjectInfo *Info;
-  
+
   if (IsVirtual) {
     // Check if we already have info about this virtual base.
     BaseSubobjectInfo *&InfoSlot = VirtualBaseInfo[RD];
@@ -886,7 +886,7 @@
   } else {
     Info = new (BaseSubobjectInfoAllocator.Allocate()) BaseSubobjectInfo;
   }
-  
+
   Info->Class = RD;
   Info->IsVirtual = IsVirtual;
   Info->Derived = nullptr;
@@ -902,10 +902,10 @@
       // This base does have a primary virtual base.
       PrimaryVirtualBase = Layout.getPrimaryBase();
       assert(PrimaryVirtualBase && "Didn't have a primary virtual base!");
-      
+
       // Now check if we have base subobject info about this primary base.
       PrimaryVirtualBaseInfo = VirtualBaseInfo.lookup(PrimaryVirtualBase);
-      
+
       if (PrimaryVirtualBaseInfo) {
         if (PrimaryVirtualBaseInfo->Derived) {
           // We did have info about this primary base, and it turns out that it
@@ -929,19 +929,19 @@
 
     Info->Bases.push_back(ComputeBaseSubobjectInfo(BaseDecl, IsVirtual, Info));
   }
-  
+
   if (PrimaryVirtualBase && !PrimaryVirtualBaseInfo) {
     // Traversing the bases must have created the base info for our primary
     // virtual base.
     PrimaryVirtualBaseInfo = VirtualBaseInfo.lookup(PrimaryVirtualBase);
     assert(PrimaryVirtualBaseInfo &&
            "Did not create a primary virtual base!");
-      
+
     // Claim the primary virtual base as our primary virtual base.
     Info->PrimaryVirtualBaseInfo = PrimaryVirtualBaseInfo;
     PrimaryVirtualBaseInfo->Derived = Info;
   }
-  
+
   return Info;
 }
 
@@ -994,7 +994,7 @@
 
   // Compute base subobject info.
   ComputeBaseSubobjectInfo(RD);
-  
+
   // If we have a primary base class, lay it out.
   if (PrimaryBase) {
     if (PrimaryBaseIsVirtual) {
@@ -1012,9 +1012,9 @@
 
       LayoutVirtualBase(PrimaryBaseInfo);
     } else {
-      BaseSubobjectInfo *PrimaryBaseInfo = 
+      BaseSubobjectInfo *PrimaryBaseInfo =
         NonVirtualBaseInfo.lookup(PrimaryBase);
-      assert(PrimaryBaseInfo && 
+      assert(PrimaryBaseInfo &&
              "Did not find base info for non-virtual primary base!");
 
       LayoutNonVirtualBase(PrimaryBaseInfo);
@@ -1024,9 +1024,9 @@
   // primary base, add it in now.
   } else if (RD->isDynamicClass()) {
     assert(DataSize == 0 && "Vtable pointer must be at offset zero!");
-    CharUnits PtrWidth = 
+    CharUnits PtrWidth =
       Context.toCharUnitsFromBits(Context.getTargetInfo().getPointerWidth(0));
-    CharUnits PtrAlign = 
+    CharUnits PtrAlign =
       Context.toCharUnitsFromBits(Context.getTargetInfo().getPointerAlign(0));
     EnsureVTablePointerAlignment(PtrAlign);
     HasOwnVFPtr = true;
@@ -1074,14 +1074,14 @@
   // This base isn't interesting, it has no virtual bases.
   if (!Info->Class->getNumVBases())
     return;
-  
+
   // First, check if we have a virtual primary base to add offsets for.
   if (Info->PrimaryVirtualBaseInfo) {
-    assert(Info->PrimaryVirtualBaseInfo->IsVirtual && 
+    assert(Info->PrimaryVirtualBaseInfo->IsVirtual &&
            "Primary virtual base is not virtual!");
     if (Info->PrimaryVirtualBaseInfo->Derived == Info) {
       // Add the offset.
-      assert(!VBases.count(Info->PrimaryVirtualBaseInfo->Class) && 
+      assert(!VBases.count(Info->PrimaryVirtualBaseInfo->Class) &&
              "primary vbase offset already exists!");
       VBases.insert(std::make_pair(Info->PrimaryVirtualBaseInfo->Class,
                                    ASTRecordLayout::VBaseInfo(Offset, false)));
@@ -1151,13 +1151,13 @@
 void ItaniumRecordLayoutBuilder::LayoutVirtualBase(
     const BaseSubobjectInfo *Base) {
   assert(!Base->Derived && "Trying to lay out a primary virtual base!");
-  
+
   // Layout the base.
   CharUnits Offset = LayoutBase(Base);
 
   // Add its base class offset.
   assert(!VBases.count(Base->Class) && "vbase offset already exists!");
-  VBases.insert(std::make_pair(Base->Class, 
+  VBases.insert(std::make_pair(Base->Class,
                        ASTRecordLayout::VBaseInfo(Offset, false)));
 
   AddPrimaryVirtualBaseOffsets(Base, Offset);
@@ -1167,9 +1167,9 @@
 ItaniumRecordLayoutBuilder::LayoutBase(const BaseSubobjectInfo *Base) {
   const ASTRecordLayout &Layout = Context.getASTRecordLayout(Base->Class);
 
-  
+
   CharUnits Offset;
-  
+
   // Query the external layout to see if it provides an offset.
   bool HasExternalLayout = false;
   if (UseExternalLayout) {
@@ -1178,7 +1178,7 @@
     else
       HasExternalLayout = External.getExternalVBaseOffset(Base->Class, Offset);
   }
-  
+
   // Clang <= 6 incorrectly applied the 'packed' attribute to base classes.
   // Per GCC's documentation, it only applies to non-static data members.
   CharUnits UnpackedBaseAlign = Layout.getNonVirtualAlignment();
@@ -1224,7 +1224,7 @@
       InferAlignment = false;
     }
   }
-  
+
   if (!Base->Class->isEmpty()) {
     // Update the data size.
     setDataSize(Offset + Layout.getNonVirtualSize());
@@ -1245,7 +1245,7 @@
     IsMsStruct = RD->isMsStruct(Context);
   }
 
-  Packed = D->hasAttr<PackedAttr>();  
+  Packed = D->hasAttr<PackedAttr>();
 
   // Honor the default struct packing maximum alignment flag.
   if (unsigned DefaultMaxFieldAlignment = Context.getLangOpts().PackStruct) {
@@ -1267,7 +1267,7 @@
     if (unsigned MaxAlign = D->getMaxAlignment())
       UpdateAlignment(Context.toCharUnitsFromBits(MaxAlign));
   }
-  
+
   // If there is an external AST source, ask it for the various offsets.
   if (const RecordDecl *RD = dyn_cast<RecordDecl>(D))
     if (ExternalASTSource *Source = Context.getExternalSource()) {
@@ -1421,7 +1421,7 @@
     setDataSize(std::max(getDataSizeInBits(), RoundedFieldSize));
     FieldOffset = 0;
   } else {
-    // The bitfield is allocated starting at the next offset aligned 
+    // The bitfield is allocated starting at the next offset aligned
     // appropriately for T', with length n bits.
     FieldOffset = llvm::alignTo(getDataSizeInBits(), Context.toBits(TypeAlign));
 
@@ -1613,7 +1613,7 @@
     bool AllowPadding = MaxFieldAlignment.isZero();
 
     // Compute the real offset.
-    if (FieldSize == 0 || 
+    if (FieldSize == 0 ||
         (AllowPadding &&
          (FieldOffset & (FieldAlign-1)) + FieldSize > TypeSize)) {
       FieldOffset = llvm::alignTo(FieldOffset, FieldAlign);
@@ -1731,7 +1731,7 @@
   LastBitfieldTypeSize = 0;
 
   bool FieldPacked = Packed || D->hasAttr<PackedAttr>();
-  CharUnits FieldOffset = 
+  CharUnits FieldOffset =
     IsUnion ? CharUnits::Zero() : getDataSize();
   CharUnits FieldSize;
   CharUnits FieldAlign;
@@ -1746,12 +1746,12 @@
     FieldAlign = Context.getTypeAlignInChars(ATy->getElementType());
   } else if (const ReferenceType *RT = D->getType()->getAs<ReferenceType>()) {
     unsigned AS = Context.getTargetAddressSpace(RT->getPointeeType());
-    FieldSize = 
+    FieldSize =
       Context.toCharUnitsFromBits(Context.getTargetInfo().getPointerWidth(AS));
-    FieldAlign = 
+    FieldAlign =
       Context.toCharUnitsFromBits(Context.getTargetInfo().getPointerAlign(AS));
   } else {
-    std::pair<CharUnits, CharUnits> FieldInfo = 
+    std::pair<CharUnits, CharUnits> FieldInfo =
       Context.getTypeInfoInChars(D->getType());
     FieldSize = FieldInfo.first;
     FieldAlign = FieldInfo.second;
@@ -1759,7 +1759,7 @@
     if (IsMsStruct) {
       // If MS bitfield layout is required, figure out what type is being
       // laid out and align the field to the width of that type.
-      
+
       // Resolve all typedefs down to their base type and round up the field
       // alignment if necessary.
       QualType T = Context.getBaseElementType(D->getType());
@@ -1805,7 +1805,7 @@
 
   if (FieldPacked)
     FieldAlign = CharUnits::One();
-  CharUnits MaxAlignmentInChars = 
+  CharUnits MaxAlignmentInChars =
     Context.toCharUnitsFromBits(D->getMaxAlignment());
   FieldAlign = std::max(FieldAlign, MaxAlignmentInChars);
   UnpackedFieldAlign = std::max(UnpackedFieldAlign, MaxAlignmentInChars);
@@ -1823,12 +1823,12 @@
   if (UseExternalLayout) {
     FieldOffset = Context.toCharUnitsFromBits(
                     updateExternalFieldOffset(D, Context.toBits(FieldOffset)));
-    
+
     if (!IsUnion && EmptySubobjects) {
       // Record the fact that we're placing a field at this offset.
       bool Allowed = EmptySubobjects->CanPlaceFieldAtOffset(D, FieldOffset);
       (void)Allowed;
-      assert(Allowed && "Externally-placed field cannot be placed here");      
+      assert(Allowed && "Externally-placed field cannot be placed here");
     }
   } else {
     if (!IsUnion && EmptySubobjects) {
@@ -1839,12 +1839,12 @@
       }
     }
   }
-  
+
   // Place this field at the current location.
   FieldOffsets.push_back(Context.toBits(FieldOffset));
 
   if (!UseExternalLayout)
-    CheckFieldPadding(Context.toBits(FieldOffset), UnpaddedFieldOffset, 
+    CheckFieldPadding(Context.toBits(FieldOffset), UnpaddedFieldOffset,
                       Context.toBits(UnpackedFieldOffset),
                       Context.toBits(UnpackedFieldAlign), FieldPacked, D);
 
@@ -1966,7 +1966,7 @@
     Alignment = CharUnits::One();
     InferAlignment = false;
   }
-  
+
   // Use the externally-supplied field offset.
   return ExternalFieldOffset;
 }
@@ -1997,7 +1997,7 @@
   // be done by clients of the AST, such as codegen.
   if (D->getLocation().isInvalid())
     return;
-  
+
   unsigned CharBitNum = Context.getTargetInfo().getCharWidth();
 
   // Warn if padding was introduced to the struct/class.
@@ -2976,7 +2976,7 @@
 
   if (D->hasExternalLexicalStorage() && !D->getDefinition())
     getExternalSource()->CompleteType(const_cast<RecordDecl*>(D));
-    
+
   D = D->getDefinition();
   assert(D && "Cannot get layout of forward declarations!");
   assert(!D->isInvalidDecl() && "Cannot get layout of invalid decl!");
@@ -3225,7 +3225,7 @@
       BufferOS << Begin << '-' << (Begin + Width - 1);
     }
   }
-  
+
   OS << llvm::right_justify(Buffer, 10) << " | ";
   OS.indent(IndentLevel * 2);
 }
@@ -3333,7 +3333,7 @@
 
   // Dump virtual bases.
   if (CXXRD && IncludeVirtualBases) {
-    const ASTRecordLayout::VBaseOffsetsMapTy &VtorDisps = 
+    const ASTRecordLayout::VBaseOffsetsMapTy &VtorDisps =
       Layout.getVBaseOffsetsMap();
 
     for (const CXXBaseSpecifier &Base : CXXRD->vbases()) {