Remove trailing space

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

llvm-svn: 338291
diff --git a/clang/lib/Sema/CodeCompleteConsumer.cpp b/clang/lib/Sema/CodeCompleteConsumer.cpp
index 9c4d315..8af54b9 100644
--- a/clang/lib/Sema/CodeCompleteConsumer.cpp
+++ b/clang/lib/Sema/CodeCompleteConsumer.cpp
@@ -49,7 +49,7 @@
   case CCC_ObjCMessageReceiver:
   case CCC_ParenthesizedExpression:
     return true;
-    
+
   case CCC_TopLevel:
   case CCC_ObjCInterface:
   case CCC_ObjCImplementation:
@@ -164,7 +164,7 @@
 // Code completion string implementation
 //===----------------------------------------------------------------------===//
 
-CodeCompletionString::Chunk::Chunk(ChunkKind Kind, const char *Text) 
+CodeCompletionString::Chunk::Chunk(ChunkKind Kind, const char *Text)
     : Kind(Kind), Text("") {
   switch (Kind) {
   case CK_TypedText:
@@ -178,7 +178,7 @@
 
   case CK_Optional:
     llvm_unreachable("Optional strings cannot be created from text");
-      
+
   case CK_LeftParen:
     this->Text = "(";
     break;
@@ -190,11 +190,11 @@
   case CK_LeftBracket:
     this->Text = "[";
     break;
-    
+
   case CK_RightBracket:
     this->Text = "]";
     break;
-    
+
   case CK_LeftBrace:
     this->Text = "{";
     break;
@@ -206,11 +206,11 @@
   case CK_LeftAngle:
     this->Text = "<";
     break;
-    
+
   case CK_RightAngle:
     this->Text = ">";
     break;
-      
+
   case CK_Comma:
     this->Text = ", ";
     break;
@@ -242,7 +242,7 @@
   return Chunk(CK_Text, Text);
 }
 
-CodeCompletionString::Chunk 
+CodeCompletionString::Chunk
 CodeCompletionString::Chunk::CreateOptional(CodeCompletionString *Optional) {
   Chunk Result;
   Result.Kind = CK_Optional;
@@ -250,30 +250,30 @@
   return Result;
 }
 
-CodeCompletionString::Chunk 
+CodeCompletionString::Chunk
 CodeCompletionString::Chunk::CreatePlaceholder(const char *Placeholder) {
   return Chunk(CK_Placeholder, Placeholder);
 }
 
-CodeCompletionString::Chunk 
+CodeCompletionString::Chunk
 CodeCompletionString::Chunk::CreateInformative(const char *Informative) {
   return Chunk(CK_Informative, Informative);
 }
 
-CodeCompletionString::Chunk 
+CodeCompletionString::Chunk
 CodeCompletionString::Chunk::CreateResultType(const char *ResultType) {
   return Chunk(CK_ResultType, ResultType);
 }
 
-CodeCompletionString::Chunk 
+CodeCompletionString::Chunk
 CodeCompletionString::Chunk::CreateCurrentParameter(
                                                 const char *CurrentParameter) {
   return Chunk(CK_CurrentParameter, CurrentParameter);
 }
 
-CodeCompletionString::CodeCompletionString(const Chunk *Chunks, 
+CodeCompletionString::CodeCompletionString(const Chunk *Chunks,
                                            unsigned NumChunks,
-                                           unsigned Priority, 
+                                           unsigned Priority,
                                            CXAvailabilityKind Availability,
                                            const char **Annotations,
                                            unsigned NumAnnotations,
@@ -281,7 +281,7 @@
                                            const char *BriefComment)
     : NumChunks(NumChunks), NumAnnotations(NumAnnotations),
       Priority(Priority), Availability(Availability),
-      ParentName(ParentName), BriefComment(BriefComment) { 
+      ParentName(ParentName), BriefComment(BriefComment) {
   assert(NumChunks <= 0xffff);
   assert(NumAnnotations <= 0xffff);
 
@@ -308,17 +308,17 @@
 std::string CodeCompletionString::getAsString() const {
   std::string Result;
   llvm::raw_string_ostream OS(Result);
-                          
+
   for (iterator C = begin(), CEnd = end(); C != CEnd; ++C) {
     switch (C->Kind) {
     case CK_Optional: OS << "{#" << C->Optional->getAsString() << "#}"; break;
     case CK_Placeholder: OS << "<#" << C->Text << "#>"; break;
-        
-    case CK_Informative: 
+
+    case CK_Informative:
     case CK_ResultType:
-      OS << "[#" << C->Text << "#]"; 
+      OS << "[#" << C->Text << "#]";
       break;
-        
+
     case CK_CurrentParameter: OS << "<#" << C->Text << "#>"; break;
     default: OS << C->Text; break;
     }
@@ -350,7 +350,7 @@
   const NamedDecl *ND = dyn_cast<NamedDecl>(DC);
   if (!ND)
     return {};
-  
+
   // Check whether we've already cached the parent name.
   StringRef &CachedParentName = ParentNames[DC];
   if (!CachedParentName.empty())
@@ -368,7 +368,7 @@
       if (ND->getIdentifier())
         Contexts.push_back(DC);
     }
-    
+
     DC = DC->getParent();
   }
 
@@ -382,11 +382,11 @@
       else {
         OS << "::";
       }
-      
+
       const DeclContext *CurDC = Contexts[I-1];
       if (const ObjCCategoryImplDecl *CatImpl = dyn_cast<ObjCCategoryImplDecl>(CurDC))
         CurDC = CatImpl->getCategoryDecl();
-      
+
       if (const ObjCCategoryDecl *Cat = dyn_cast<ObjCCategoryDecl>(CurDC)) {
         const ObjCInterfaceDecl *Interface = Cat->getClassInterface();
         if (!Interface) {
@@ -395,13 +395,13 @@
           CachedParentName = StringRef((const char *)(uintptr_t)~0U, 0);
           return {};
         }
-        
+
         OS << Interface->getName() << '(' << Cat->getName() << ')';
       } else {
         OS << cast<NamedDecl>(CurDC)->getName();
       }
     }
-    
+
     CachedParentName = AllocatorRef->CopyString(OS.str());
   }
 
@@ -413,7 +413,7 @@
       sizeof(CodeCompletionString) + sizeof(Chunk) * Chunks.size() +
           sizeof(const char *) * Annotations.size(),
       alignof(CodeCompletionString));
-  CodeCompletionString *Result 
+  CodeCompletionString *Result
     = new (Mem) CodeCompletionString(Chunks.data(), Chunks.size(),
                                      Priority, Availability,
                                      Annotations.data(), Annotations.size(),
@@ -459,14 +459,14 @@
 void CodeCompletionBuilder::addParentContext(const DeclContext *DC) {
   if (DC->isTranslationUnit())
     return;
-  
+
   if (DC->isFunctionOrMethod())
     return;
-  
+
   const NamedDecl *ND = dyn_cast<NamedDecl>(DC);
   if (!ND)
     return;
-  
+
   ParentName = getCodeCompletionTUInfo().getParentName(DC);
 }
 
@@ -492,11 +492,11 @@
   switch (Kind) {
   case CK_Function:
     return Function->getType()->getAs<FunctionType>();
-      
+
   case CK_FunctionTemplate:
     return FunctionTemplate->getTemplatedDecl()->getType()
              ->getAs<FunctionType>();
-      
+
   case CK_FunctionType:
     return Type;
   }
@@ -526,13 +526,13 @@
   llvm_unreachable("Unknown code completion result Kind.");
 }
 
-void 
+void
 PrintingCodeCompleteConsumer::ProcessCodeCompleteResults(Sema &SemaRef,
                                                  CodeCompletionContext Context,
                                                  CodeCompletionResult *Results,
                                                          unsigned NumResults) {
   std::stable_sort(Results, Results + NumResults);
-  
+
   StringRef Filter = SemaRef.getPreprocessor().getCodeCompletionFilter();
 
   // Print the results.
@@ -545,7 +545,7 @@
       OS << *Results[I].Declaration;
       if (Results[I].Hidden)
         OS << " (Hidden)";
-      if (CodeCompletionString *CCS 
+      if (CodeCompletionString *CCS
             = Results[I].CreateCodeCompletionString(SemaRef, Context,
                                                     getAllocator(),
                                                     CCTUInfo,
@@ -574,14 +574,14 @@
       }
       OS << '\n';
       break;
-      
+
     case CodeCompletionResult::RK_Keyword:
       OS << Results[I].Keyword << '\n';
       break;
-        
+
     case CodeCompletionResult::RK_Macro:
       OS << Results[I].Macro->getName();
-      if (CodeCompletionString *CCS 
+      if (CodeCompletionString *CCS
             = Results[I].CreateCodeCompletionString(SemaRef, Context,
                                                     getAllocator(),
                                                     CCTUInfo,
@@ -590,9 +590,9 @@
       }
       OS << '\n';
       break;
-        
+
     case CodeCompletionResult::RK_Pattern:
-      OS << "Pattern : " 
+      OS << "Pattern : "
          << Results[I].Pattern->getAsString() << '\n';
       break;
     }
@@ -624,7 +624,7 @@
   return OS.str();
 }
 
-void 
+void
 PrintingCodeCompleteConsumer::ProcessOverloadCandidates(Sema &SemaRef,
                                                         unsigned CurrentArg,
                                               OverloadCandidate *Candidates,
@@ -655,19 +655,19 @@
       break;
     }
     LLVM_FALLTHROUGH;
-      
+
   case RK_Declaration: {
     // Set the availability based on attributes.
     switch (getDeclAvailability(Declaration)) {
     case AR_Available:
     case AR_NotYetIntroduced:
-      Availability = CXAvailability_Available;      
+      Availability = CXAvailability_Available;
       break;
-      
+
     case AR_Deprecated:
       Availability = CXAvailability_Deprecated;
       break;
-      
+
     case AR_Unavailable:
       Availability = CXAvailability_NotAvailable;
       break;
@@ -676,11 +676,11 @@
     if (const FunctionDecl *Function = dyn_cast<FunctionDecl>(Declaration))
       if (Function->isDeleted())
         Availability = CXAvailability_NotAvailable;
-      
+
     CursorKind = getCursorKindForDecl(Declaration);
     if (CursorKind == CXCursor_UnexposedDecl) {
-      // FIXME: Forward declarations of Objective-C classes and protocols 
-      // are not directly exposed, but we want code completion to treat them 
+      // FIXME: Forward declarations of Objective-C classes and protocols
+      // are not directly exposed, but we want code completion to treat them
       // like a definition.
       if (isa<ObjCInterfaceDecl>(Declaration))
         CursorKind = CXCursor_ObjCInterfaceDecl;
@@ -717,9 +717,9 @@
       // Handle declarations below.
       break;
   }
-  
+
   DeclarationName Name = Declaration->getDeclName();
-  
+
   // If the name is a simple identifier (by far the common case), or a
   // zero-argument selector, just return a reference to that identifier.
   if (IdentifierInfo *Id = Name.getAsIdentifierInfo())
@@ -728,12 +728,12 @@
     if (IdentifierInfo *Id
         = Name.getObjCSelector().getIdentifierInfoForSlot(0))
       return Id->getName();
-  
+
   Saved = Name.getAsString();
   return Saved;
 }
-    
-bool clang::operator<(const CodeCompletionResult &X, 
+
+bool clang::operator<(const CodeCompletionResult &X,
                       const CodeCompletionResult &Y) {
   std::string XSaved, YSaved;
   StringRef XStr = X.getOrderedName(XSaved);
@@ -741,11 +741,11 @@
   int cmp = XStr.compare_lower(YStr);
   if (cmp)
     return cmp < 0;
-  
+
   // If case-insensitive comparison fails, try case-sensitive comparison.
   cmp = XStr.compare(YStr);
   if (cmp)
     return cmp < 0;
-  
+
   return false;
 }