Remove trailing space

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

llvm-svn: 338291
diff --git a/clang/lib/Sema/SemaPseudoObject.cpp b/clang/lib/Sema/SemaPseudoObject.cpp
index 4484e9b..a8af75d 100644
--- a/clang/lib/Sema/SemaPseudoObject.cpp
+++ b/clang/lib/Sema/SemaPseudoObject.cpp
@@ -316,10 +316,10 @@
    OpaqueValueExpr *InstanceKey;
    ObjCMethodDecl *AtIndexGetter;
    Selector AtIndexGetterSelector;
-  
+
    ObjCMethodDecl *AtIndexSetter;
    Selector AtIndexSetterSelector;
-  
+
  public:
    ObjCSubscriptOpBuilder(Sema &S, ObjCSubscriptRefExpr *refExpr, bool IsUnique)
        : PseudoOpBuilder(S, refExpr->getSourceRange().getBegin(), IsUnique),
@@ -367,7 +367,7 @@
 /// Capture the given expression in an OpaqueValueExpr.
 OpaqueValueExpr *PseudoOpBuilder::capture(Expr *e) {
   // Make a new OVE whose source is the given expression.
-  OpaqueValueExpr *captured = 
+  OpaqueValueExpr *captured =
     new (S.Context) OpaqueValueExpr(GenericLoc, e->getType(),
                                     e->getValueKind(), e->getObjectKind(),
                                     e);
@@ -389,7 +389,7 @@
   assert(ResultIndex == PseudoObjectExpr::NoResult);
 
   // If the expression hasn't already been captured, just capture it
-  // and set the new semantic 
+  // and set the new semantic
   if (!isa<OpaqueValueExpr>(e)) {
     OpaqueValueExpr *cap = capture(e);
     setResultToLastSemantic();
@@ -618,11 +618,11 @@
       // Must build the getter selector the hard way.
       ObjCMethodDecl *setter = RefExpr->getImplicitPropertySetter();
       assert(setter && "both setter and getter are null - cannot happen");
-      IdentifierInfo *setterName = 
+      IdentifierInfo *setterName =
         setter->getSelector().getIdentifierInfoForSlot(0);
       IdentifierInfo *getterName =
           &S.Context.Idents.get(setterName->getName().substr(3));
-      GetterSelector = 
+      GetterSelector =
         S.PP.getSelectorTable().getNullarySelector(getterName);
       return false;
     }
@@ -636,7 +636,7 @@
 /// Try to find the most accurate setter declaration for the property
 /// reference.
 ///
-/// \return true if a setter was found, in which case Setter 
+/// \return true if a setter was found, in which case Setter
 bool ObjCPropertyOpBuilder::findSetter(bool warn) {
   // For implicit properties, just trust the lookup we already did.
   if (RefExpr->isImplicitProperty()) {
@@ -987,9 +987,9 @@
 // ObjCSubscript build stuff.
 //
 
-/// objective-c subscripting-specific behavior for doing lvalue-to-rvalue 
+/// objective-c subscripting-specific behavior for doing lvalue-to-rvalue
 /// conversion.
-/// FIXME. Remove this routine if it is proven that no additional 
+/// FIXME. Remove this routine if it is proven that no additional
 /// specifity is needed.
 ExprResult ObjCSubscriptOpBuilder::buildRValueOperation(Expr *op) {
   ExprResult result = PseudoOpBuilder::buildRValueOperation(op);
@@ -1007,21 +1007,21 @@
   // There must be a method to do the Index'ed assignment.
   if (!findAtIndexSetter())
     return ExprError();
-  
+
   // Verify that we can do a compound assignment.
   if (opcode != BO_Assign && !findAtIndexGetter())
     return ExprError();
-  
+
   ExprResult result =
   PseudoOpBuilder::buildAssignmentOperation(Sc, opcLoc, opcode, LHS, RHS);
   if (result.isInvalid()) return ExprError();
-  
+
   // Various warnings about objc Index'ed assignments in ARC.
   if (S.getLangOpts().ObjCAutoRefCount && InstanceBase) {
     S.checkRetainCycles(InstanceBase->getSourceExpr(), RHS);
     S.checkUnsafeExprAssigns(opcLoc, LHS, RHS);
   }
-  
+
   return result;
 }
 
@@ -1049,15 +1049,15 @@
   return syntacticBase;
 }
 
-/// CheckSubscriptingKind - This routine decide what type 
+/// CheckSubscriptingKind - This routine decide what type
 /// of indexing represented by "FromE" is being done.
-Sema::ObjCSubscriptKind 
+Sema::ObjCSubscriptKind
   Sema::CheckSubscriptingKind(Expr *FromE) {
   // If the expression already has integral or enumeration type, we're golden.
   QualType T = FromE->getType();
   if (T->isIntegralOrEnumerationType())
     return OS_Array;
-  
+
   // If we don't have a class type in C++, there's no way we can get an
   // expression of integral or enumeration type.
   const RecordType *RecordTy = T->getAs<RecordType>();
@@ -1066,7 +1066,7 @@
     // All other scalar cases are assumed to be dictionary indexing which
     // caller handles, with diagnostics if needed.
     return OS_Dictionary;
-  if (!getLangOpts().CPlusPlus || 
+  if (!getLangOpts().CPlusPlus ||
       !RecordTy || RecordTy->isIncompleteType()) {
     // No indexing can be done. Issue diagnostics and quit.
     const Expr *IndexExpr = FromE->IgnoreParenImpCasts();
@@ -1078,12 +1078,12 @@
         << T;
     return OS_Error;
   }
-  
+
   // We must have a complete class type.
-  if (RequireCompleteType(FromE->getExprLoc(), T, 
+  if (RequireCompleteType(FromE->getExprLoc(), T,
                           diag::err_objc_index_incomplete_class_type, FromE))
     return OS_Error;
-  
+
   // Look for a conversion to an integral, enumeration type, or
   // objective-C pointer type.
   int NoIntegrals=0, NoObjCIdPointers=0;
@@ -1125,17 +1125,17 @@
 
 /// CheckKeyForObjCARCConversion - This routine suggests bridge casting of CF
 /// objects used as dictionary subscript key objects.
-static void CheckKeyForObjCARCConversion(Sema &S, QualType ContainerT, 
+static void CheckKeyForObjCARCConversion(Sema &S, QualType ContainerT,
                                          Expr *Key) {
   if (ContainerT.isNull())
     return;
   // dictionary subscripting.
   // - (id)objectForKeyedSubscript:(id)key;
   IdentifierInfo *KeyIdents[] = {
-    &S.Context.Idents.get("objectForKeyedSubscript")  
+    &S.Context.Idents.get("objectForKeyedSubscript")
   };
   Selector GetterSelector = S.Context.Selectors.getSelector(1, KeyIdents);
-  ObjCMethodDecl *Getter = S.LookupMethodInObjectType(GetterSelector, ContainerT, 
+  ObjCMethodDecl *Getter = S.LookupMethodInObjectType(GetterSelector, ContainerT,
                                                       true /*instance*/);
   if (!Getter)
     return;
@@ -1147,25 +1147,25 @@
 bool ObjCSubscriptOpBuilder::findAtIndexGetter() {
   if (AtIndexGetter)
     return true;
-  
+
   Expr *BaseExpr = RefExpr->getBaseExpr();
   QualType BaseT = BaseExpr->getType();
-  
+
   QualType ResultType;
   if (const ObjCObjectPointerType *PTy =
       BaseT->getAs<ObjCObjectPointerType>()) {
     ResultType = PTy->getPointeeType();
   }
-  Sema::ObjCSubscriptKind Res = 
+  Sema::ObjCSubscriptKind Res =
     S.CheckSubscriptingKind(RefExpr->getKeyExpr());
   if (Res == Sema::OS_Error) {
     if (S.getLangOpts().ObjCAutoRefCount)
-      CheckKeyForObjCARCConversion(S, ResultType, 
+      CheckKeyForObjCARCConversion(S, ResultType,
                                    RefExpr->getKeyExpr());
     return false;
   }
   bool arrayRef = (Res == Sema::OS_Array);
-  
+
   if (ResultType.isNull()) {
     S.Diag(BaseExpr->getExprLoc(), diag::err_objc_subscript_base_type)
       << BaseExpr->getType() << arrayRef;
@@ -1175,24 +1175,24 @@
     // dictionary subscripting.
     // - (id)objectForKeyedSubscript:(id)key;
     IdentifierInfo *KeyIdents[] = {
-      &S.Context.Idents.get("objectForKeyedSubscript")  
+      &S.Context.Idents.get("objectForKeyedSubscript")
     };
     AtIndexGetterSelector = S.Context.Selectors.getSelector(1, KeyIdents);
   }
   else {
     // - (id)objectAtIndexedSubscript:(size_t)index;
     IdentifierInfo *KeyIdents[] = {
-      &S.Context.Idents.get("objectAtIndexedSubscript")  
+      &S.Context.Idents.get("objectAtIndexedSubscript")
     };
-  
+
     AtIndexGetterSelector = S.Context.Selectors.getSelector(1, KeyIdents);
   }
-  
-  AtIndexGetter = S.LookupMethodInObjectType(AtIndexGetterSelector, ResultType, 
+
+  AtIndexGetter = S.LookupMethodInObjectType(AtIndexGetterSelector, ResultType,
                                              true /*instance*/);
-  
+
   if (!AtIndexGetter && S.getLangOpts().DebuggerObjCLiteral) {
-    AtIndexGetter = ObjCMethodDecl::Create(S.Context, SourceLocation(), 
+    AtIndexGetter = ObjCMethodDecl::Create(S.Context, SourceLocation(),
                            SourceLocation(), AtIndexGetterSelector,
                            S.Context.getObjCIdType() /*ReturnType*/,
                            nullptr /*TypeSourceInfo */,
@@ -1220,20 +1220,20 @@
       << BaseExpr->getType() << 0 << arrayRef;
       return false;
     }
-    AtIndexGetter = 
-      S.LookupInstanceMethodInGlobalPool(AtIndexGetterSelector, 
-                                         RefExpr->getSourceRange(), 
+    AtIndexGetter =
+      S.LookupInstanceMethodInGlobalPool(AtIndexGetterSelector,
+                                         RefExpr->getSourceRange(),
                                          true);
   }
-  
+
   if (AtIndexGetter) {
     QualType T = AtIndexGetter->parameters()[0]->getType();
     if ((arrayRef && !T->isIntegralOrEnumerationType()) ||
         (!arrayRef && !T->isObjCObjectPointerType())) {
-      S.Diag(RefExpr->getKeyExpr()->getExprLoc(), 
+      S.Diag(RefExpr->getKeyExpr()->getExprLoc(),
              arrayRef ? diag::err_objc_subscript_index_type
                       : diag::err_objc_subscript_key_type) << T;
-      S.Diag(AtIndexGetter->parameters()[0]->getLocation(), 
+      S.Diag(AtIndexGetter->parameters()[0]->getLocation(),
              diag::note_parameter_type) << T;
       return false;
     }
@@ -1251,32 +1251,32 @@
 bool ObjCSubscriptOpBuilder::findAtIndexSetter() {
   if (AtIndexSetter)
     return true;
-  
+
   Expr *BaseExpr = RefExpr->getBaseExpr();
   QualType BaseT = BaseExpr->getType();
-  
+
   QualType ResultType;
   if (const ObjCObjectPointerType *PTy =
       BaseT->getAs<ObjCObjectPointerType>()) {
     ResultType = PTy->getPointeeType();
   }
-  
-  Sema::ObjCSubscriptKind Res = 
+
+  Sema::ObjCSubscriptKind Res =
     S.CheckSubscriptingKind(RefExpr->getKeyExpr());
   if (Res == Sema::OS_Error) {
     if (S.getLangOpts().ObjCAutoRefCount)
-      CheckKeyForObjCARCConversion(S, ResultType, 
+      CheckKeyForObjCARCConversion(S, ResultType,
                                    RefExpr->getKeyExpr());
     return false;
   }
   bool arrayRef = (Res == Sema::OS_Array);
-  
+
   if (ResultType.isNull()) {
     S.Diag(BaseExpr->getExprLoc(), diag::err_objc_subscript_base_type)
       << BaseExpr->getType() << arrayRef;
     return false;
   }
-  
+
   if (!arrayRef) {
     // dictionary subscripting.
     // - (void)setObject:(id)object forKeyedSubscript:(id)key;
@@ -1294,7 +1294,7 @@
     };
     AtIndexSetterSelector = S.Context.Selectors.getSelector(2, KeyIdents);
   }
-  AtIndexSetter = S.LookupMethodInObjectType(AtIndexSetterSelector, ResultType, 
+  AtIndexSetter = S.LookupMethodInObjectType(AtIndexSetterSelector, ResultType,
                                              true /*instance*/);
 
   if (!AtIndexSetter && S.getLangOpts().DebuggerObjCLiteral) {
@@ -1328,35 +1328,35 @@
     Params.push_back(key);
     AtIndexSetter->setMethodParams(S.Context, Params, None);
   }
-  
+
   if (!AtIndexSetter) {
     if (!BaseT->isObjCIdType()) {
-      S.Diag(BaseExpr->getExprLoc(), 
+      S.Diag(BaseExpr->getExprLoc(),
              diag::err_objc_subscript_method_not_found)
       << BaseExpr->getType() << 1 << arrayRef;
       return false;
     }
-    AtIndexSetter = 
-      S.LookupInstanceMethodInGlobalPool(AtIndexSetterSelector, 
-                                         RefExpr->getSourceRange(), 
+    AtIndexSetter =
+      S.LookupInstanceMethodInGlobalPool(AtIndexSetterSelector,
+                                         RefExpr->getSourceRange(),
                                          true);
   }
-  
+
   bool err = false;
   if (AtIndexSetter && arrayRef) {
     QualType T = AtIndexSetter->parameters()[1]->getType();
     if (!T->isIntegralOrEnumerationType()) {
-      S.Diag(RefExpr->getKeyExpr()->getExprLoc(), 
+      S.Diag(RefExpr->getKeyExpr()->getExprLoc(),
              diag::err_objc_subscript_index_type) << T;
-      S.Diag(AtIndexSetter->parameters()[1]->getLocation(), 
+      S.Diag(AtIndexSetter->parameters()[1]->getLocation(),
              diag::note_parameter_type) << T;
       err = true;
     }
     T = AtIndexSetter->parameters()[0]->getType();
     if (!T->isObjCObjectPointerType()) {
-      S.Diag(RefExpr->getBaseExpr()->getExprLoc(), 
+      S.Diag(RefExpr->getBaseExpr()->getExprLoc(),
              diag::err_objc_subscript_object_type) << T << arrayRef;
-      S.Diag(AtIndexSetter->parameters()[0]->getLocation(), 
+      S.Diag(AtIndexSetter->parameters()[0]->getLocation(),
              diag::note_parameter_type) << T;
       err = true;
     }
@@ -1371,7 +1371,7 @@
         else
           S.Diag(RefExpr->getBaseExpr()->getExprLoc(),
                  diag::err_objc_subscript_dic_object_type) << T;
-        S.Diag(AtIndexSetter->parameters()[i]->getLocation(), 
+        S.Diag(AtIndexSetter->parameters()[i]->getLocation(),
                diag::note_parameter_type) << T;
         err = true;
       }
@@ -1385,13 +1385,13 @@
 ExprResult ObjCSubscriptOpBuilder::buildGet() {
   if (!findAtIndexGetter())
     return ExprError();
-  
+
   QualType receiverType = InstanceBase->getType();
-    
+
   // Build a message-send.
   ExprResult msg;
   Expr *Index = InstanceKey;
-  
+
   // Arguments.
   Expr *args[] = { Index };
   assert(InstanceBase);
@@ -1417,17 +1417,17 @@
     S.DiagnoseUseOfDecl(AtIndexSetter, GenericLoc);
   QualType receiverType = InstanceBase->getType();
   Expr *Index = InstanceKey;
-  
+
   // Arguments.
   Expr *args[] = { op, Index };
-  
+
   // Build a message-send.
   ExprResult msg = S.BuildInstanceMessageImplicit(InstanceBase, receiverType,
                                                   GenericLoc,
                                                   AtIndexSetterSelector,
                                                   AtIndexSetter,
                                                   MultiExprArg(args, 2));
-  
+
   if (!msg.isInvalid() && captureSetValueAsResult) {
     ObjCMessageExpr *msgExpr =
       cast<ObjCMessageExpr>(msg.get()->IgnoreImplicit());
@@ -1435,7 +1435,7 @@
     if (CanCaptureValue(arg))
       msgExpr->setArg(0, captureValueAsResult(arg));
   }
-  
+
   return msg;
 }