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/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp
index 25ff53c..5d62c0c 100644
--- a/lib/Parse/ParseDecl.cpp
+++ b/lib/Parse/ParseDecl.cpp
@@ -69,10 +69,10 @@
 ///          typespec
 ///          typequal
 ///          storageclass
-///          
+///
 /// FIXME: The GCC grammar/code for this construct implies we need two
-/// token lookahead. Comment from gcc: "If they start with an identifier 
-/// which is followed by a comma or close parenthesis, then the arguments 
+/// token lookahead. Comment from gcc: "If they start with an identifier
+/// which is followed by a comma or close parenthesis, then the arguments
 /// start with that identifier; otherwise they are an expression list."
 ///
 /// At the moment, I am not doing 2 token lookahead. I am also unaware of
@@ -82,9 +82,9 @@
 
 AttributeList *Parser::ParseAttributes(SourceLocation *EndLoc) {
   assert(Tok.is(tok::kw___attribute) && "Not an attribute list!");
-  
+
   AttributeList *CurrAttr = 0;
-  
+
   while (Tok.is(tok::kw___attribute)) {
     ConsumeToken();
     if (ExpectAndConsume(tok::l_paren, diag::err_expected_lparen_after,
@@ -99,8 +99,8 @@
     // Parse the attribute-list. e.g. __attribute__(( weak, alias("__f") ))
     while (Tok.is(tok::identifier) || isDeclarationSpecifier() ||
            Tok.is(tok::comma)) {
-           
-      if (Tok.is(tok::comma)) { 
+
+      if (Tok.is(tok::comma)) {
         // allows for empty/non-empty attributes. ((__vector_size__(16),,,,))
         ConsumeToken();
         continue;
@@ -108,26 +108,26 @@
       // we have an identifier or declaration specifier (const, int, etc.)
       IdentifierInfo *AttrName = Tok.getIdentifierInfo();
       SourceLocation AttrNameLoc = ConsumeToken();
-      
+
       // check if we have a "paramterized" attribute
       if (Tok.is(tok::l_paren)) {
         ConsumeParen(); // ignore the left paren loc for now
-        
+
         if (Tok.is(tok::identifier)) {
           IdentifierInfo *ParmName = Tok.getIdentifierInfo();
           SourceLocation ParmLoc = ConsumeToken();
-          
-          if (Tok.is(tok::r_paren)) { 
+
+          if (Tok.is(tok::r_paren)) {
             // __attribute__(( mode(byte) ))
             ConsumeParen(); // ignore the right paren loc for now
-            CurrAttr = new AttributeList(AttrName, AttrNameLoc, 
+            CurrAttr = new AttributeList(AttrName, AttrNameLoc,
                                          ParmName, ParmLoc, 0, 0, CurrAttr);
           } else if (Tok.is(tok::comma)) {
             ConsumeToken();
             // __attribute__(( format(printf, 1, 2) ))
             ExprVector ArgExprs(Actions);
             bool ArgExprsOk = true;
-            
+
             // now parse the non-empty comma separated list of expressions
             while (1) {
               OwningExprResult ArgExpr(ParseAssignmentExpression());
@@ -144,7 +144,7 @@
             }
             if (ArgExprsOk && Tok.is(tok::r_paren)) {
               ConsumeParen(); // ignore the right paren loc for now
-              CurrAttr = new AttributeList(AttrName, AttrNameLoc, ParmName, 
+              CurrAttr = new AttributeList(AttrName, AttrNameLoc, ParmName,
                            ParmLoc, ArgExprs.take(), ArgExprs.size(), CurrAttr);
             }
           }
@@ -154,7 +154,7 @@
           // parse a possibly empty comma separated list of expressions
             // __attribute__(( nonnull() ))
             ConsumeParen(); // ignore the right paren loc for now
-            CurrAttr = new AttributeList(AttrName, AttrNameLoc, 
+            CurrAttr = new AttributeList(AttrName, AttrNameLoc,
                                          0, SourceLocation(), 0, 0, CurrAttr);
             break;
           case tok::kw_char:
@@ -174,7 +174,7 @@
             // If it's a builtin type name, eat it and expect a rparen
             // __attribute__(( vec_type_hint(char) ))
             ConsumeToken();
-            CurrAttr = new AttributeList(AttrName, AttrNameLoc, 
+            CurrAttr = new AttributeList(AttrName, AttrNameLoc,
                                          0, SourceLocation(), 0, 0, CurrAttr);
             if (Tok.is(tok::r_paren))
               ConsumeParen();
@@ -183,7 +183,7 @@
             // __attribute__(( aligned(16) ))
             ExprVector ArgExprs(Actions);
             bool ArgExprsOk = true;
-            
+
             // now parse the list of expressions
             while (1) {
               OwningExprResult ArgExpr(ParseAssignmentExpression());
@@ -209,7 +209,7 @@
           }
         }
       } else {
-        CurrAttr = new AttributeList(AttrName, AttrNameLoc, 
+        CurrAttr = new AttributeList(AttrName, AttrNameLoc,
                                      0, SourceLocation(), 0, 0, CurrAttr);
       }
     }
@@ -322,7 +322,7 @@
   default:
     return ParseSimpleDeclaration(Context, DeclEnd);
   }
-  
+
   // This routine returns a DeclGroup, if the thing we parsed only contains a
   // single decl, convert it now.
   return Actions.ConvertDeclToDeclGroup(SingleDecl);
@@ -341,7 +341,7 @@
   // Parse the common declaration-specifiers piece.
   DeclSpec DS;
   ParseDeclarationSpecifiers(DS);
-  
+
   // C99 6.7.2.3p6: Handle "struct-or-union identifier;", "enum { X };"
   // declaration-specifiers init-declarator-list[opt] ';'
   if (Tok.is(tok::semi)) {
@@ -349,24 +349,24 @@
     DeclPtrTy TheDecl = Actions.ParsedFreeStandingDeclSpec(CurScope, DS);
     return Actions.ConvertDeclToDeclGroup(TheDecl);
   }
-  
+
   Declarator DeclaratorInfo(DS, (Declarator::TheContext)Context);
   ParseDeclarator(DeclaratorInfo);
-  
+
   DeclGroupPtrTy DG =
     ParseInitDeclaratorListAfterFirstDeclarator(DeclaratorInfo);
 
   DeclEnd = Tok.getLocation();
-  
+
   // If the client wants to check what comes after the declaration, just return
   // immediately without checking anything!
   if (!RequireSemi) return DG;
-  
+
   if (Tok.is(tok::semi)) {
     ConsumeToken();
     return DG;
   }
-  
+
   Diag(Tok, diag::err_expected_semi_declaration);
   // Skip to end of block or statement
   SkipUntil(tok::r_brace, true, true);
@@ -406,27 +406,27 @@
       SkipUntil(tok::semi, true, true);
       return DeclPtrTy();
     }
-    
+
     D.setAsmLabel(AsmLabel.release());
     D.SetRangeEnd(Loc);
   }
-  
+
   // If attributes are present, parse them.
   if (Tok.is(tok::kw___attribute)) {
     SourceLocation Loc;
     AttributeList *AttrList = ParseAttributes(&Loc);
     D.AddAttributes(AttrList, Loc);
   }
-  
+
   // Inform the current actions module that we just parsed this declarator.
-  DeclPtrTy ThisDecl = TemplateInfo.TemplateParams? 
+  DeclPtrTy ThisDecl = TemplateInfo.TemplateParams?
       Actions.ActOnTemplateDeclarator(CurScope,
                              Action::MultiTemplateParamsArg(Actions,
                                           TemplateInfo.TemplateParams->data(),
                                           TemplateInfo.TemplateParams->size()),
                                     D)
     : Actions.ActOnDeclarator(CurScope, D);
-  
+
   // Parse declarator '=' initializer.
   if (Tok.is(tok::equal)) {
     ConsumeToken();
@@ -467,7 +467,7 @@
                                             CommaLocs.data(), RParenLoc);
     }
   } else {
-    bool TypeContainsUndeducedAuto = 
+    bool TypeContainsUndeducedAuto =
       D.getDeclSpec().getTypeSpecType() == DeclSpec::TST_auto;
     Actions.ActOnUninitializedDecl(ThisDecl, TypeContainsUndeducedAuto);
   }
@@ -492,25 +492,25 @@
   // Declarators may be grouped together ("int X, *Y, Z();"). Remember the decls
   // that we parse together here.
   llvm::SmallVector<DeclPtrTy, 8> DeclsInGroup;
-  
+
   // At this point, we know that it is not a function definition.  Parse the
   // rest of the init-declarator-list.
   while (1) {
     DeclPtrTy ThisDecl = ParseDeclarationAfterDeclarator(D);
     if (ThisDecl.get())
       DeclsInGroup.push_back(ThisDecl);
-    
+
     // If we don't have a comma, it is either the end of the list (a ';') or an
     // error, bail out.
     if (Tok.isNot(tok::comma))
       break;
-    
+
     // Consume the comma.
     ConsumeToken();
-    
+
     // Parse the next declarator.
     D.clear();
-    
+
     // Accept attributes in an init-declarator.  In the first declarator in a
     // declaration, these would be part of the declspec.  In subsequent
     // declarators, they become part of the declarator itself, so that they
@@ -523,10 +523,10 @@
       AttributeList *AttrList = ParseAttributes(&Loc);
       D.AddAttributes(AttrList, Loc);
     }
-    
+
     ParseDeclarator(D);
   }
-  
+
   return Actions.FinalizeDeclaratorGroup(CurScope, D.getDeclSpec(),
                                          DeclsInGroup.data(),
                                          DeclsInGroup.size());
@@ -542,13 +542,13 @@
   /// specifier-qualifier-list is a subset of declaration-specifiers.  Just
   /// parse declaration-specifiers and complain about extra stuff.
   ParseDeclarationSpecifiers(DS);
-  
+
   // Validate declspec for type-name.
   unsigned Specs = DS.getParsedSpecifiers();
   if (Specs == DeclSpec::PQ_None && !DS.getNumProtocolQualifiers() &&
       !DS.getAttributes())
     Diag(Tok, diag::err_typename_requires_specqual);
-  
+
   // Issue diagnostic and remove storage class if present.
   if (Specs & DeclSpec::PQ_StorageClassSpecifier) {
     if (DS.getStorageClassSpecLoc().isValid())
@@ -557,7 +557,7 @@
       Diag(DS.getThreadSpecLoc(), diag::err_typename_invalid_storageclass);
     DS.ClearStorageClassSpecs();
   }
-  
+
   // Issue diagnostic and remove function specfier if present.
   if (Specs & DeclSpec::PQ_FunctionSpecifier) {
     if (DS.isInlineSpecified())
@@ -608,7 +608,7 @@
                               const ParsedTemplateInfo &TemplateInfo,
                               AccessSpecifier AS) {
   assert(Tok.is(tok::identifier) && "should have identifier");
-  
+
   SourceLocation Loc = Tok.getLocation();
   // If we see an identifier that is not a type name, we normally would
   // parse it as the identifer being declared.  However, when a typename
@@ -623,7 +623,7 @@
   // next token is obviously invalid for a type.  Parse these as a case
   // with an invalid type specifier.
   assert(!DS.hasTypeSpecifier() && "Type specifier checked above");
-  
+
   // Since we know that this either implicit int (which is rare) or an
   // error, we'd do lookahead to try to do better recovery.
   if (isValidAfterIdentifierInDeclarator(NextToken())) {
@@ -632,7 +632,7 @@
     // identifier in the declarator.
     return false;
   }
-  
+
   // Otherwise, if we don't consume this token, we are going to emit an
   // error anyway.  Try to recover from various common problems.  Check
   // to see if this was a reference to a tag name without a tag specified.
@@ -642,7 +642,7 @@
   if (SS == 0) {
     const char *TagName = 0;
     tok::TokenKind TagKind = tok::unknown;
-  
+
     switch (Actions.isTagName(*Tok.getIdentifierInfo(), CurScope)) {
       default: break;
       case DeclSpec::TST_enum:  TagName="enum"  ;TagKind=tok::kw_enum  ;break;
@@ -650,12 +650,12 @@
       case DeclSpec::TST_struct:TagName="struct";TagKind=tok::kw_struct;break;
       case DeclSpec::TST_class: TagName="class" ;TagKind=tok::kw_class ;break;
     }
-  
+
     if (TagName) {
       Diag(Loc, diag::err_use_of_tag_name_without_tag)
         << Tok.getIdentifierInfo() << TagName
         << CodeModificationHint::CreateInsertion(Tok.getLocation(),TagName);
-      
+
       // Parse this as a tag as if the missing tag were present.
       if (TagKind == tok::kw_enum)
         ParseEnumSpecifier(Loc, DS, AS);
@@ -664,20 +664,20 @@
       return true;
     }
   }
-  
+
   // Since this is almost certainly an invalid type name, emit a
   // diagnostic that says it, eat the token, and mark the declspec as
   // invalid.
   SourceRange R;
   if (SS) R = SS->getRange();
-  
+
   Diag(Loc, diag::err_unknown_typename) << Tok.getIdentifierInfo() << R;
   const char *PrevSpec;
   unsigned DiagID;
   DS.SetTypeSpecType(DeclSpec::TST_error, Loc, PrevSpec, DiagID);
   DS.SetRangeEnd(Tok.getLocation());
   ConsumeToken();
-  
+
   // TODO: Could inject an invalid typedef decl in an enclosing scope to
   // avoid rippling error messages on subsequent uses of the same type,
   // could be useful if #include was forgotten.
@@ -719,13 +719,13 @@
     SourceLocation Loc = Tok.getLocation();
 
     switch (Tok.getKind()) {
-    default: 
+    default:
     DoneWithDeclSpec:
       // If this is not a declaration specifier token, we're done reading decl
       // specifiers.  First verify that DeclSpec's are consistent.
       DS.Finish(Diags, PP);
       return;
-        
+
     case tok::coloncolon: // ::foo::bar
       // Annotate C++ scope specifiers.  If we get one, loop.
       if (TryAnnotateCXXScopeToken(true))
@@ -738,13 +738,13 @@
 
       // We are looking for a qualified typename.
       Token Next = NextToken();
-      if (Next.is(tok::annot_template_id) && 
+      if (Next.is(tok::annot_template_id) &&
           static_cast<TemplateIdAnnotation *>(Next.getAnnotationValue())
             ->Kind == TNK_Type_template) {
         // We have a qualified template-id, e.g., N::A<int>
         CXXScopeSpec SS;
         ParseOptionalCXXScopeSpecifier(SS, /*ObjectType=*/0, true);
-        assert(Tok.is(tok::annot_template_id) && 
+        assert(Tok.is(tok::annot_template_id) &&
                "ParseOptionalCXXScopeSpecifier not working");
         AnnotateTemplateIdTokenAsType(&SS);
         continue;
@@ -771,26 +771,26 @@
       // If the referenced identifier is not a type, then this declspec is
       // erroneous: We already checked about that it has no type specifier, and
       // C++ doesn't have implicit int.  Diagnose it as a typo w.r.t. to the
-      // typename.  
+      // typename.
       if (TypeRep == 0) {
         ConsumeToken();   // Eat the scope spec so the identifier is current.
         if (ParseImplicitInt(DS, &SS, TemplateInfo, AS)) continue;
         goto DoneWithDeclSpec;
       }
-      
+
       ConsumeToken(); // The C++ scope.
 
       isInvalid = DS.SetTypeSpecType(DeclSpec::TST_typename, Loc, PrevSpec,
                                      DiagID, TypeRep);
       if (isInvalid)
         break;
-      
+
       DS.SetRangeEnd(Tok.getLocation());
       ConsumeToken(); // The typename.
 
       continue;
     }
-        
+
     case tok::annot_typename: {
       if (Tok.getAnnotationValue())
         isInvalid = DS.SetTypeSpecType(DeclSpec::TST_typename, Loc, PrevSpec,
@@ -799,38 +799,38 @@
         DS.SetTypeSpecError();
       DS.SetRangeEnd(Tok.getAnnotationEndLoc());
       ConsumeToken(); // The typename
-      
+
       // Objective-C supports syntax of the form 'id<proto1,proto2>' where 'id'
       // is a specific typedef and 'itf<proto1,proto2>' where 'itf' is an
       // Objective-C interface.  If we don't have Objective-C or a '<', this is
       // just a normal reference to a typedef name.
       if (!Tok.is(tok::less) || !getLang().ObjC1)
         continue;
-      
+
       SourceLocation EndProtoLoc;
       llvm::SmallVector<DeclPtrTy, 8> ProtocolDecl;
       ParseObjCProtocolReferences(ProtocolDecl, false, EndProtoLoc);
       DS.setProtocolQualifiers(ProtocolDecl.data(), ProtocolDecl.size());
-      
+
       DS.SetRangeEnd(EndProtoLoc);
       continue;
     }
-        
+
       // typedef-name
     case tok::identifier: {
       // In C++, check to see if this is a scope specifier like foo::bar::, if
       // so handle it as such.  This is important for ctor parsing.
       if (getLang().CPlusPlus && TryAnnotateCXXScopeToken(true))
         continue;
-      
+
       // This identifier can only be a typedef name if we haven't already seen
       // a type-specifier.  Without this check we misparse:
       //  typedef int X; struct Y { short X; };  as 'short int'.
       if (DS.hasTypeSpecifier())
         goto DoneWithDeclSpec;
-      
+
       // It has to be available as a typedef too!
-      TypeTy *TypeRep = Actions.getTypeName(*Tok.getIdentifierInfo(), 
+      TypeTy *TypeRep = Actions.getTypeName(*Tok.getIdentifierInfo(),
                                             Tok.getLocation(), CurScope);
 
       // If this is not a typedef name, don't parse it as part of the declspec,
@@ -844,11 +844,11 @@
       // being defined and the next token is a '(', then this is a
       // constructor declaration. We're done with the decl-specifiers
       // and will treat this token as an identifier.
-      if (getLang().CPlusPlus && 
-          (CurScope->isClassScope() || 
-           (CurScope->isTemplateParamScope() && 
+      if (getLang().CPlusPlus &&
+          (CurScope->isClassScope() ||
+           (CurScope->isTemplateParamScope() &&
             CurScope->getParent()->isClassScope())) &&
-          Actions.isCurrentClassName(*Tok.getIdentifierInfo(), CurScope) && 
+          Actions.isCurrentClassName(*Tok.getIdentifierInfo(), CurScope) &&
           NextToken().getKind() == tok::l_paren)
         goto DoneWithDeclSpec;
 
@@ -856,7 +856,7 @@
                                      DiagID, TypeRep);
       if (isInvalid)
         break;
-      
+
       DS.SetRangeEnd(Tok.getLocation());
       ConsumeToken(); // The identifier
 
@@ -866,12 +866,12 @@
       // just a normal reference to a typedef name.
       if (!Tok.is(tok::less) || !getLang().ObjC1)
         continue;
-      
+
       SourceLocation EndProtoLoc;
       llvm::SmallVector<DeclPtrTy, 8> ProtocolDecl;
       ParseObjCProtocolReferences(ProtocolDecl, false, EndProtoLoc);
       DS.setProtocolQualifiers(ProtocolDecl.data(), ProtocolDecl.size());
-      
+
       DS.SetRangeEnd(EndProtoLoc);
 
       // Need to support trailing type qualifiers (e.g. "id<p> const").
@@ -881,7 +881,7 @@
 
       // type-name
     case tok::annot_template_id: {
-      TemplateIdAnnotation *TemplateId 
+      TemplateIdAnnotation *TemplateId
         = static_cast<TemplateIdAnnotation *>(Tok.getAnnotationValue());
       if (TemplateId->Kind != TNK_Type_template) {
         // This template-id does not refer to a type name, so we're
@@ -904,7 +904,7 @@
     case tok::kw___declspec:
       DS.AddAttributes(ParseMicrosoftDeclSpec());
       continue;
-      
+
     // Microsoft single token adornments.
     case tok::kw___forceinline:
       // FIXME: Add handling here!
@@ -958,7 +958,7 @@
     case tok::kw___thread:
       isInvalid = DS.SetStorageClassSpecThread(Loc, PrevSpec, DiagID);
       break;
-          
+
     // function-specifier
     case tok::kw_inline:
       isInvalid = DS.SetFunctionSpecInline(Loc, PrevSpec, DiagID);
@@ -980,7 +980,7 @@
         isInvalid = true;
       }
       break;
-      
+
     // type-specifier
     case tok::kw_short:
       isInvalid = DS.SetTypeSpecWidth(DeclSpec::TSW_short, Loc, PrevSpec,
@@ -1111,7 +1111,7 @@
       // but we support it.
       if (DS.hasTypeSpecifier() || !getLang().ObjC1)
         goto DoneWithDeclSpec;
-        
+
       {
         SourceLocation EndProtoLoc;
         llvm::SmallVector<DeclPtrTy, 8> ProtocolDecl;
@@ -1201,7 +1201,7 @@
     if (NextToken().is(tok::kw_new) ||    // ::new
         NextToken().is(tok::kw_delete))   // ::delete
       return false;
-    
+
     // Annotate typenames and C++ scope specifiers.  If we get one, just
     // recurse to handle whatever we get.
     if (TryAnnotateTypeOrScopeToken())
@@ -1209,7 +1209,7 @@
                                         TemplateInfo);
     // Otherwise, not a type specifier.
     return false;
-      
+
   // simple-type-specifier:
   case tok::annot_typename: {
     if (Tok.getAnnotationValue())
@@ -1219,19 +1219,19 @@
       DS.SetTypeSpecError();
     DS.SetRangeEnd(Tok.getAnnotationEndLoc());
     ConsumeToken(); // The typename
-    
+
     // Objective-C supports syntax of the form 'id<proto1,proto2>' where 'id'
     // is a specific typedef and 'itf<proto1,proto2>' where 'itf' is an
     // Objective-C interface.  If we don't have Objective-C or a '<', this is
     // just a normal reference to a typedef name.
     if (!Tok.is(tok::less) || !getLang().ObjC1)
       return true;
-    
+
     SourceLocation EndProtoLoc;
     llvm::SmallVector<DeclPtrTy, 8> ProtocolDecl;
     ParseObjCProtocolReferences(ProtocolDecl, false, EndProtoLoc);
     DS.setProtocolQualifiers(ProtocolDecl.data(), ProtocolDecl.size());
-    
+
     DS.SetRangeEnd(EndProtoLoc);
     return true;
   }
@@ -1342,7 +1342,7 @@
   case tok::kw_decltype:
     ParseDecltypeSpecifier(DS);
     return true;
-      
+
   // C++0x auto support.
   case tok::kw_auto:
     if (!getLang().CPlusPlus0x)
@@ -1400,11 +1400,11 @@
     ConsumeToken();
     return ParseStructDeclaration(DS, Fields);
   }
-  
+
   // Parse the common specifier-qualifiers-list piece.
   SourceLocation DSStart = Tok.getLocation();
   ParseSpecifierQualifierList(DS);
-  
+
   // If there are no declarators, this is a free-standing declaration
   // specifier. Let the actions module cope with it.
   if (Tok.is(tok::semi)) {
@@ -1416,12 +1416,12 @@
   Fields.push_back(FieldDeclarator(DS));
   while (1) {
     FieldDeclarator &DeclaratorInfo = Fields.back();
-    
+
     /// struct-declarator: declarator
     /// struct-declarator: declarator[opt] ':' constant-expression
     if (Tok.isNot(tok::colon))
       ParseDeclarator(DeclaratorInfo.D);
-    
+
     if (Tok.is(tok::colon)) {
       ConsumeToken();
       OwningExprResult Res(ParseConstantExpression());
@@ -1473,9 +1473,9 @@
   PrettyStackTraceActionsDecl CrashInfo(TagDecl, RecordLoc, Actions,
                                         PP.getSourceManager(),
                                         "parsing struct/union body");
-  
+
   SourceLocation LBraceLoc = ConsumeBrace();
-  
+
   ParseScope StructScope(this, Scope::ClassScope|Scope::DeclScope);
   Actions.ActOnTagStartDefinition(CurScope, TagDecl);
 
@@ -1491,7 +1491,7 @@
   // While we still have something to read, read the declarations in the struct.
   while (Tok.isNot(tok::r_brace) && Tok.isNot(tok::eof)) {
     // Each iteration of this loop reads one struct-declaration.
-    
+
     // Check for extraneous top-level semicolon.
     if (Tok.is(tok::semi)) {
       Diag(Tok, diag::ext_extra_struct_semi)
@@ -1505,7 +1505,7 @@
     FieldDeclarators.clear();
     if (!Tok.is(tok::at)) {
       ParseStructDeclaration(DS, FieldDeclarators);
-      
+
       // Convert them all to fields.
       for (unsigned i = 0, e = FieldDeclarators.size(); i != e; ++i) {
         FieldDeclarator &FD = FieldDeclarators[i];
@@ -1539,12 +1539,12 @@
         continue;
       }
       llvm::SmallVector<DeclPtrTy, 16> Fields;
-      Actions.ActOnDefs(CurScope, TagDecl, Tok.getLocation(), 
+      Actions.ActOnDefs(CurScope, TagDecl, Tok.getLocation(),
                         Tok.getIdentifierInfo(), Fields);
       FieldDecls.insert(FieldDecls.end(), Fields.begin(), Fields.end());
       ConsumeToken();
       ExpectAndConsume(tok::r_paren, diag::err_expected_rparen);
-    } 
+    }
 
     if (Tok.is(tok::semi)) {
       ConsumeToken();
@@ -1557,9 +1557,9 @@
       SkipUntil(tok::r_brace, true, true);
     }
   }
-  
+
   SourceLocation RBraceLoc = MatchRHSPunctuation(tok::r_brace, LBraceLoc);
-  
+
   AttributeList *AttrList = 0;
   // If attributes exist after struct contents, parse them.
   if (Tok.is(tok::kw___attribute))
@@ -1607,16 +1607,16 @@
       }
     }
   }
-  
+
   // Must have either 'enum name' or 'enum {...}'.
   if (Tok.isNot(tok::identifier) && Tok.isNot(tok::l_brace)) {
     Diag(Tok, diag::err_expected_ident_lbrace);
-    
+
     // Skip the rest of this declarator, up until the comma or semicolon.
     SkipUntil(tok::comma, true);
     return;
   }
-  
+
   // If an identifier is present, consume and remember it.
   IdentifierInfo *Name = 0;
   SourceLocation NameLoc;
@@ -1624,7 +1624,7 @@
     Name = Tok.getIdentifierInfo();
     NameLoc = ConsumeToken();
   }
-  
+
   // There are three options here.  If we have 'enum foo;', then this is a
   // forward declaration.  If we have 'enum foo {...' then this is a
   // definition. Otherwise we have something like 'enum foo xyz', a reference.
@@ -1645,10 +1645,10 @@
                                        StartLoc, SS, Name, NameLoc, Attr, AS,
                                        Action::MultiTemplateParamsArg(Actions),
                                        Owned);
-  
+
   if (Tok.is(tok::l_brace))
     ParseEnumBody(StartLoc, TagDecl);
-  
+
   // TODO: semantic analysis on the declspec for enums.
   const char *PrevSpec = 0;
   unsigned DiagID;
@@ -1673,20 +1673,20 @@
   Actions.ActOnTagStartDefinition(CurScope, EnumDecl);
 
   SourceLocation LBraceLoc = ConsumeBrace();
-  
+
   // C does not allow an empty enumerator-list, C++ does [dcl.enum].
   if (Tok.is(tok::r_brace) && !getLang().CPlusPlus)
     Diag(Tok, diag::ext_empty_struct_union_enum) << "enum";
-  
+
   llvm::SmallVector<DeclPtrTy, 32> EnumConstantDecls;
 
   DeclPtrTy LastEnumConstDecl;
-  
+
   // Parse the enumerator-list.
   while (Tok.is(tok::identifier)) {
     IdentifierInfo *Ident = Tok.getIdentifierInfo();
     SourceLocation IdentLoc = ConsumeToken();
-    
+
     SourceLocation EqualLoc;
     OwningExprResult AssignedVal(Actions);
     if (Tok.is(tok::equal)) {
@@ -1695,7 +1695,7 @@
       if (AssignedVal.isInvalid())
         SkipUntil(tok::comma, tok::r_brace, true, true);
     }
-    
+
     // Install the enumerator constant into EnumDecl.
     DeclPtrTy EnumConstDecl = Actions.ActOnEnumConstant(CurScope, EnumDecl,
                                                         LastEnumConstDecl,
@@ -1704,18 +1704,18 @@
                                                         AssignedVal.release());
     EnumConstantDecls.push_back(EnumConstDecl);
     LastEnumConstDecl = EnumConstDecl;
-    
+
     if (Tok.isNot(tok::comma))
       break;
     SourceLocation CommaLoc = ConsumeToken();
-    
-    if (Tok.isNot(tok::identifier) && 
+
+    if (Tok.isNot(tok::identifier) &&
         !(getLang().C99 || getLang().CPlusPlus0x))
       Diag(CommaLoc, diag::ext_enumerator_list_comma)
         << getLang().CPlusPlus
         << CodeModificationHint::CreateRemoval((SourceRange(CommaLoc)));
   }
-  
+
   // Eat the }.
   SourceLocation RBraceLoc = MatchRHSPunctuation(tok::r_brace, LBraceLoc);
 
@@ -1727,7 +1727,7 @@
   Actions.ActOnEnumBody(StartLoc, LBraceLoc, RBraceLoc, EnumDecl,
                         EnumConstantDecls.data(), EnumConstantDecls.size(),
                         CurScope, Attr);
-  
+
   EnumScope.Exit();
   Actions.ActOnTagFinishDefinition(CurScope, EnumDecl, RBraceLoc);
 }
@@ -1750,7 +1750,7 @@
 bool Parser::isTypeSpecifierQualifier() {
   switch (Tok.getKind()) {
   default: return false;
-      
+
   case tok::identifier:   // foo::bar
   case tok::kw_typename:  // typename T::type
     // Annotate typenames and C++ scope specifiers.  If we get one, just
@@ -1771,12 +1771,12 @@
       return isTypeSpecifierQualifier();
     // Otherwise, not a type specifier.
     return false;
-      
+
     // GNU attributes support.
   case tok::kw___attribute:
     // GNU typeof support.
   case tok::kw_typeof:
-  
+
     // type-specifiers
   case tok::kw_short:
   case tok::kw_long:
@@ -1797,14 +1797,14 @@
   case tok::kw__Decimal32:
   case tok::kw__Decimal64:
   case tok::kw__Decimal128:
-    
+
     // struct-or-union-specifier (C99) or class-specifier (C++)
   case tok::kw_class:
   case tok::kw_struct:
   case tok::kw_union:
     // enum-specifier
   case tok::kw_enum:
-    
+
     // type-qualifier
   case tok::kw_const:
   case tok::kw_volatile:
@@ -1813,11 +1813,11 @@
     // typedef-name
   case tok::annot_typename:
     return true;
-      
+
     // GNU ObjC bizarre protocol extension: <proto1,proto2> with implicit 'id'.
   case tok::less:
     return getLang().ObjC1;
-  
+
   case tok::kw___cdecl:
   case tok::kw___stdcall:
   case tok::kw___fastcall:
@@ -1832,7 +1832,7 @@
 bool Parser::isDeclarationSpecifier() {
   switch (Tok.getKind()) {
   default: return false;
-    
+
   case tok::identifier:   // foo::bar
     // Unfortunate hack to support "Class.factoryMethod" notation.
     if (getLang().ObjC1 && NextToken().is(tok::period))
@@ -1850,14 +1850,14 @@
     if (NextToken().is(tok::kw_new) ||    // ::new
         NextToken().is(tok::kw_delete))   // ::delete
       return false;
-    
+
     // Annotate typenames and C++ scope specifiers.  If we get one, just
     // recurse to handle whatever we get.
     if (TryAnnotateTypeOrScopeToken())
       return isDeclarationSpecifier();
     // Otherwise, not a declaration specifier.
     return false;
-      
+
     // storage-class-specifier
   case tok::kw_typedef:
   case tok::kw_extern:
@@ -1866,7 +1866,7 @@
   case tok::kw_auto:
   case tok::kw_register:
   case tok::kw___thread:
-    
+
     // type-specifiers
   case tok::kw_short:
   case tok::kw_long:
@@ -1888,14 +1888,14 @@
   case tok::kw__Decimal32:
   case tok::kw__Decimal64:
   case tok::kw__Decimal128:
-  
+
     // struct-or-union-specifier (C99) or class-specifier (C++)
   case tok::kw_class:
   case tok::kw_struct:
   case tok::kw_union:
     // enum-specifier
   case tok::kw_enum:
-    
+
     // type-qualifier
   case tok::kw_const:
   case tok::kw_volatile:
@@ -1911,15 +1911,15 @@
 
     // GNU typeof support.
   case tok::kw_typeof:
-    
+
     // GNU attributes.
   case tok::kw___attribute:
     return true;
-  
+
     // GNU ObjC bizarre protocol extension: <proto1,proto2> with implicit 'id'.
   case tok::less:
     return getLang().ObjC1;
-    
+
   case tok::kw___declspec:
   case tok::kw___cdecl:
   case tok::kw___stdcall:
@@ -2035,7 +2035,7 @@
        Tok.is(tok::annot_cxxscope))) {
     CXXScopeSpec SS;
     if (ParseOptionalCXXScopeSpecifier(SS, /*ObjectType=*/0, true)) {
-      if(Tok.isNot(tok::star)) {
+      if (Tok.isNot(tok::star)) {
         // The scope spec really belongs to the direct-declarator.
         D.getCXXScopeSpec() = SS;
         if (DirectDeclParser)
@@ -2093,7 +2093,7 @@
                     SourceLocation());
     else
       // Remember that we parsed a Block type, and remember the type-quals.
-      D.AddTypeInfo(DeclaratorChunk::getBlockPointer(DS.getTypeQualifiers(), 
+      D.AddTypeInfo(DeclaratorChunk::getBlockPointer(DS.getTypeQualifiers(),
                                                      Loc, DS.TakeAttributes()),
                     SourceLocation());
   } else {
@@ -2178,10 +2178,10 @@
 ///         qualified-id            [TODO]
 ///
 ///       unqualified-id: [C++ 5.1]
-///         identifier 
+///         identifier
 ///         operator-function-id
 ///         conversion-function-id  [TODO]
-///          '~' class-name         
+///          '~' class-name
 ///         template-id
 ///
 void Parser::ParseDirectDeclarator(Declarator &D) {
@@ -2191,7 +2191,7 @@
     if (D.mayHaveIdentifier()) {
       // ParseDeclaratorInternal might already have parsed the scope.
       bool afterCXXScope = D.getCXXScopeSpec().isSet() ||
-        ParseOptionalCXXScopeSpecifier(D.getCXXScopeSpec(), /*ObjectType=*/0, 
+        ParseOptionalCXXScopeSpecifier(D.getCXXScopeSpec(), /*ObjectType=*/0,
                                        true);
       if (afterCXXScope) {
         // Change the declaration context for name lookup, until this function
@@ -2203,7 +2203,7 @@
         assert(Tok.getIdentifierInfo() && "Not an identifier?");
 
         // If this identifier is the name of the current class, it's a
-        // constructor name. 
+        // constructor name.
         if (!D.getDeclSpec().hasTypeSpecifier() &&
             Actions.isCurrentClassName(*Tok.getIdentifierInfo(),CurScope)) {
           CXXScopeSpec *SS = afterCXXScope? &D.getCXXScopeSpec() : 0;
@@ -2216,7 +2216,7 @@
         ConsumeToken();
         goto PastIdentifier;
       } else if (Tok.is(tok::annot_template_id)) {
-        TemplateIdAnnotation *TemplateId 
+        TemplateIdAnnotation *TemplateId
           = static_cast<TemplateIdAnnotation *>(Tok.getAnnotationValue());
 
         // FIXME: Could this template-id name a constructor?
@@ -2305,11 +2305,11 @@
     D.SetIdentifier(0, Tok.getLocation());
     D.setInvalidType(true);
   }
-  
+
  PastIdentifier:
   assert(D.isPastIdentifier() &&
          "Haven't past the location of the identifier yet?");
-  
+
   while (1) {
     if (Tok.is(tok::l_paren)) {
       // The paren may be part of a C++ direct initializer, eg. "int x(1);".
@@ -2333,7 +2333,7 @@
 
 /// ParseParenDeclarator - We parsed the declarator D up to a paren.  This is
 /// only called before the identifier, so these are most likely just grouping
-/// parens for precedence.  If we find that these are actually function 
+/// parens for precedence.  If we find that these are actually function
 /// parameter parens in an abstract-declarator, we call ParseFunctionDeclarator.
 ///
 ///       direct-declarator:
@@ -2347,7 +2347,7 @@
 void Parser::ParseParenDeclarator(Declarator &D) {
   SourceLocation StartLoc = ConsumeParen();
   assert(!D.isPastIdentifier() && "Should be called before passing identifier");
-  
+
   // Eat any attributes before we look at whether this is a grouping or function
   // declarator paren.  If this is a grouping paren, the attribute applies to
   // the type being built up, for example:
@@ -2362,7 +2362,7 @@
   bool RequiresArg = false;
   if (Tok.is(tok::kw___attribute)) {
     AttrList = ParseAttributes();
-    
+
     // We require that the argument list (if this is a non-grouping paren) be
     // present even if the attribute list was empty.
     RequiresArg = true;
@@ -2373,13 +2373,13 @@
        Tok.is(tok::kw___ptr64)) {
     AttrList = ParseMicrosoftTypeAttributes(AttrList);
   }
-  
+
   // If we haven't past the identifier yet (or where the identifier would be
   // stored, if this is an abstract declarator), then this is probably just
   // grouping parens. However, if this could be an abstract-declarator, then
   // this could also be the start of function arguments (consider 'void()').
   bool isGrouping;
-  
+
   if (!D.mayOmitIdentifier()) {
     // If this can't be an abstract-declarator, this *must* be a grouping
     // paren, because we haven't seen the identifier yet.
@@ -2394,7 +2394,7 @@
     // Otherwise, this is a grouping paren, e.g. 'int (*X)' or 'int(X)'.
     isGrouping = true;
   }
-  
+
   // If this is a grouping paren, handle:
   // direct-declarator: '(' declarator ')'
   // direct-declarator: '(' attributes declarator ')'
@@ -2412,7 +2412,7 @@
     D.SetRangeEnd(Loc);
     return;
   }
-  
+
   // Okay, if this wasn't a grouping paren, it must be the start of a function
   // argument list.  Recognize that this declarator will never have an
   // identifier (and remember where it would have been), then call into
@@ -2458,7 +2458,7 @@
                                      bool RequiresArg) {
   // lparen is already consumed!
   assert(D.isPastIdentifier() && "Should not call before identifier!");
-  
+
   // This parameter list may be empty.
   if (Tok.is(tok::r_paren)) {
     if (RequiresArg) {
@@ -2524,9 +2524,9 @@
       return ParseFunctionDeclaratorIdentifierList(LParenLoc, D);
     }
   }
-  
+
   // Finally, a normal, non-empty parameter type list.
-  
+
   // Build up an array of information about the parsed arguments.
   llvm::SmallVector<DeclaratorChunk::ParamInfo, 16> ParamInfo;
 
@@ -2534,7 +2534,7 @@
   // function prototype scope, including parameter declarators.
   ParseScope PrototypeScope(this,
                             Scope::FunctionPrototypeScope|Scope::DeclScope);
-  
+
   bool IsVariadic = false;
   SourceLocation EllipsisLoc;
   while (1) {
@@ -2543,9 +2543,9 @@
       EllipsisLoc = ConsumeToken();     // Consume the ellipsis.
       break;
     }
-    
+
     SourceLocation DSStart = Tok.getLocation();
-    
+
     // Parse the declaration-specifiers.
     DeclSpec DS;
 
@@ -2555,7 +2555,7 @@
       AttrList = 0;  // Only apply the attributes to the first parameter.
     }
     ParseDeclarationSpecifiers(DS);
-    
+
     // Parse the declarator.  This is "PrototypeContext", because we must
     // accept either 'declarator' or 'abstract-declarator' here.
     Declarator ParmDecl(DS, Declarator::PrototypeContext);
@@ -2567,10 +2567,10 @@
       AttributeList *AttrList = ParseAttributes(&Loc);
       ParmDecl.AddAttributes(AttrList, Loc);
     }
-    
+
     // Remember this parsed parameter in ParamInfo.
     IdentifierInfo *ParmII = ParmDecl.getIdentifier();
-    
+
     // DefArgToks is used when the parsing of default arguments needs
     // to be delayed.
     CachedTokens *DefArgToks = 0;
@@ -2584,7 +2584,7 @@
     } else {
       // Otherwise, we have something.  Add it and let semantic analysis try
       // to grok it and add the result to the ParamInfo we are building.
-      
+
       // Inform the actions module about the parameter declarator, so it gets
       // added to the current scope.
       DeclPtrTy Param = Actions.ActOnParamDeclarator(CurScope, ParmDecl);
@@ -2605,18 +2605,18 @@
           // FIXME: Can we use a smart pointer for Toks?
           DefArgToks = new CachedTokens;
 
-          if (!ConsumeAndStoreUntil(tok::comma, tok::r_paren, *DefArgToks, 
+          if (!ConsumeAndStoreUntil(tok::comma, tok::r_paren, *DefArgToks,
                                     tok::semi, false)) {
             delete DefArgToks;
             DefArgToks = 0;
             Actions.ActOnParamDefaultArgumentError(Param);
           } else
-            Actions.ActOnParamUnparsedDefaultArgument(Param, EqualLoc, 
+            Actions.ActOnParamUnparsedDefaultArgument(Param, EqualLoc,
                                                 (*DefArgToks)[1].getLocation());
         } else {
           // Consume the '='.
           ConsumeToken();
-        
+
           OwningExprResult DefArgResult(ParseAssignmentExpression());
           if (DefArgResult.isInvalid()) {
             Actions.ActOnParamDefaultArgumentError(Param);
@@ -2628,22 +2628,22 @@
           }
         }
       }
-      
-      ParamInfo.push_back(DeclaratorChunk::ParamInfo(ParmII, 
-                                          ParmDecl.getIdentifierLoc(), Param, 
+
+      ParamInfo.push_back(DeclaratorChunk::ParamInfo(ParmII,
+                                          ParmDecl.getIdentifierLoc(), Param,
                                           DefArgToks));
     }
 
     // If the next token is a comma, consume it and keep reading arguments.
     if (Tok.isNot(tok::comma)) break;
-    
+
     // Consume the comma.
     ConsumeToken();
   }
-  
+
   // Leave prototype scope.
   PrototypeScope.Exit();
-  
+
   // If we have the closing ')', eat it.
   SourceLocation RParenLoc = MatchRHSPunctuation(tok::r_paren, LParenLoc);
   SourceLocation EndLoc = RParenLoc;
@@ -2698,7 +2698,7 @@
   // Build up an array of information about the parsed arguments.
   llvm::SmallVector<DeclaratorChunk::ParamInfo, 16> ParamInfo;
   llvm::SmallSet<const IdentifierInfo*, 16> ParamsSoFar;
-  
+
   // If there was no identifier specified for the declarator, either we are in
   // an abstract-declarator, or we are in a parameter declarator which was found
   // to be abstract.  In abstract-declarators, identifier lists are not valid:
@@ -2712,13 +2712,13 @@
   ParamInfo.push_back(DeclaratorChunk::ParamInfo(Tok.getIdentifierInfo(),
                                                  Tok.getLocation(),
                                                  DeclPtrTy()));
-  
+
   ConsumeToken();  // eat the first identifier.
-  
+
   while (Tok.is(tok::comma)) {
     // Eat the comma.
     ConsumeToken();
-    
+
     // If this isn't an identifier, report the error and skip until ')'.
     if (Tok.isNot(tok::identifier)) {
       Diag(Tok, diag::err_expected_ident);
@@ -2731,7 +2731,7 @@
     // Reject 'typedef int y; int test(x, y)', but continue parsing.
     if (Actions.getTypeName(*ParmII, Tok.getLocation(), CurScope))
       Diag(Tok, diag::err_unexpected_typedef_ident) << ParmII;
-    
+
     // Verify that the argument identifier has not already been mentioned.
     if (!ParamsSoFar.insert(ParmII)) {
       Diag(Tok, diag::err_param_redefinition) << ParmII;
@@ -2741,7 +2741,7 @@
                                                      Tok.getLocation(),
                                                      DeclPtrTy()));
     }
-    
+
     // Eat the identifier.
     ConsumeToken();
   }
@@ -2769,7 +2769,7 @@
 /// [C99]   direct-declarator '[' type-qual-list[opt] '*' ']'
 void Parser::ParseBracketDeclarator(Declarator &D) {
   SourceLocation StartLoc = ConsumeBracket();
-  
+
   // C array syntax has many features, but by-far the most common is [] and [4].
   // This code does a fast path to handle some of the most obvious cases.
   if (Tok.getKind() == tok::r_square) {
@@ -2791,33 +2791,33 @@
     // If there was an error parsing the assignment-expression, recover.
     if (ExprRes.isInvalid())
       ExprRes.release();  // Deallocate expr, just use [].
-    
+
     // Remember that we parsed a array type, and remember its features.
     D.AddTypeInfo(DeclaratorChunk::getArray(0, false, 0, ExprRes.release(),
                                             StartLoc, EndLoc),
                   EndLoc);
     return;
   }
-  
+
   // If valid, this location is the position where we read the 'static' keyword.
   SourceLocation StaticLoc;
   if (Tok.is(tok::kw_static))
     StaticLoc = ConsumeToken();
-  
+
   // If there is a type-qualifier-list, read it now.
   // Type qualifiers in an array subscript are a C99 feature.
   DeclSpec DS;
   ParseTypeQualifierListOpt(DS, false /*no attributes*/);
-  
+
   // If we haven't already read 'static', check to see if there is one after the
   // type-qualifier-list.
   if (!StaticLoc.isValid() && Tok.is(tok::kw_static))
     StaticLoc = ConsumeToken();
-  
+
   // Handle "direct-declarator [ type-qual-list[opt] * ]".
   bool isStar = false;
   OwningExprResult NumElements(Actions);
-  
+
   // Handle the case where we have '[*]' as the array size.  However, a leading
   // star could be the start of an expression, for example 'X[*p + 4]'.  Verify
   // the the token after the star is a ']'.  Since stars in arrays are
@@ -2835,7 +2835,7 @@
     // of assignment-expr.  The only difference is that assignment-expr allows
     // things like '=' and '*='.  Sema rejects these in C89 mode because they
     // are not i-c-e's, so we don't need to distinguish between the two here.
-    
+
     // Parse the constant-expression or assignment-expression now (depending
     // on dialect).
     if (getLang().CPlusPlus)
@@ -2843,7 +2843,7 @@
     else
       NumElements = ParseAssignmentExpression();
   }
-  
+
   // If there was an error parsing the assignment-expression, recover.
   if (NumElements.isInvalid()) {
     D.setInvalidType(true);
@@ -2885,7 +2885,7 @@
     DS.SetRangeEnd(Tok.getLocation());
   else
     DS.SetRangeEnd(CastRange.getEnd());
-  
+
   if (isCastExpr) {
     if (!CastTy) {
       DS.SetTypeSpecError();