]> granicus.if.org Git - clang/commitdiff
convert tabs to spaces, patch by Mike Stump!
authorChris Lattner <sabre@nondot.org>
Mon, 25 Feb 2008 21:04:36 +0000 (21:04 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 25 Feb 2008 21:04:36 +0000 (21:04 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47560 91177308-0d34-0410-b5e6-96231b3b80d8

12 files changed:
AST/Decl.cpp
Driver/ASTConsumers.cpp
Driver/clang.cpp
Parse/ParseDecl.cpp
Sema/SemaDecl.cpp
Sema/SemaDeclObjC.cpp
Sema/SemaExprObjC.cpp
include/clang/AST/ASTContext.h
include/clang/AST/Decl.h
include/clang/AST/DeclObjC.h
include/clang/Parse/Action.h
include/clang/Parse/Parser.h

index 5d68927b82facc95a3183e1160af79660f57d493..05cd49021bb485768ca71ff58fe936b6a5f7a92e 100644 (file)
@@ -95,79 +95,79 @@ bool Decl::CollectingStats(bool enable) {
 void Decl::PrintStats() {
   fprintf(stderr, "*** Decl Stats:\n");
   fprintf(stderr, "  %d decls total.\n", 
-         int(nFuncs+nBlockVars+nFileVars+nParmVars+nFieldDecls+nSUC+
-             nEnumDecls+nEnumConst+nTypedef+nInterfaceDecls+nClassDecls+
-             nMethodDecls+nProtocolDecls+nCategoryDecls+nIvarDecls));
+          int(nFuncs+nBlockVars+nFileVars+nParmVars+nFieldDecls+nSUC+
+              nEnumDecls+nEnumConst+nTypedef+nInterfaceDecls+nClassDecls+
+              nMethodDecls+nProtocolDecls+nCategoryDecls+nIvarDecls));
   fprintf(stderr, "    %d function decls, %d each (%d bytes)\n", 
-         nFuncs, (int)sizeof(FunctionDecl), int(nFuncs*sizeof(FunctionDecl)));
+          nFuncs, (int)sizeof(FunctionDecl), int(nFuncs*sizeof(FunctionDecl)));
   fprintf(stderr, "    %d block variable decls, %d each (%d bytes)\n", 
-         nBlockVars, (int)sizeof(BlockVarDecl), 
-         int(nBlockVars*sizeof(BlockVarDecl)));
+          nBlockVars, (int)sizeof(BlockVarDecl), 
+          int(nBlockVars*sizeof(BlockVarDecl)));
   fprintf(stderr, "    %d file variable decls, %d each (%d bytes)\n", 
-         nFileVars, (int)sizeof(FileVarDecl), 
-         int(nFileVars*sizeof(FileVarDecl)));
+          nFileVars, (int)sizeof(FileVarDecl), 
+          int(nFileVars*sizeof(FileVarDecl)));
   fprintf(stderr, "    %d parameter variable decls, %d each (%d bytes)\n", 
-         nParmVars, (int)sizeof(ParmVarDecl),
-         int(nParmVars*sizeof(ParmVarDecl)));
+          nParmVars, (int)sizeof(ParmVarDecl),
+          int(nParmVars*sizeof(ParmVarDecl)));
   fprintf(stderr, "    %d field decls, %d each (%d bytes)\n", 
-         nFieldDecls, (int)sizeof(FieldDecl),
-         int(nFieldDecls*sizeof(FieldDecl)));
+          nFieldDecls, (int)sizeof(FieldDecl),
+          int(nFieldDecls*sizeof(FieldDecl)));
   fprintf(stderr, "    %d struct/union/class decls, %d each (%d bytes)\n", 
-         nSUC, (int)sizeof(RecordDecl),
-         int(nSUC*sizeof(RecordDecl)));
+          nSUC, (int)sizeof(RecordDecl),
+          int(nSUC*sizeof(RecordDecl)));
   fprintf(stderr, "    %d enum decls, %d each (%d bytes)\n", 
-         nEnumDecls, (int)sizeof(EnumDecl), 
-         int(nEnumDecls*sizeof(EnumDecl)));
+          nEnumDecls, (int)sizeof(EnumDecl), 
+          int(nEnumDecls*sizeof(EnumDecl)));
   fprintf(stderr, "    %d enum constant decls, %d each (%d bytes)\n", 
-         nEnumConst, (int)sizeof(EnumConstantDecl),
-         int(nEnumConst*sizeof(EnumConstantDecl)));
+          nEnumConst, (int)sizeof(EnumConstantDecl),
+          int(nEnumConst*sizeof(EnumConstantDecl)));
   fprintf(stderr, "    %d typedef decls, %d each (%d bytes)\n", 
-         nTypedef, (int)sizeof(TypedefDecl),int(nTypedef*sizeof(TypedefDecl)));
+          nTypedef, (int)sizeof(TypedefDecl),int(nTypedef*sizeof(TypedefDecl)));
   // Objective-C decls...
   fprintf(stderr, "    %d interface decls, %d each (%d bytes)\n", 
-         nInterfaceDecls, (int)sizeof(ObjCInterfaceDecl),
-         int(nInterfaceDecls*sizeof(ObjCInterfaceDecl)));
+          nInterfaceDecls, (int)sizeof(ObjCInterfaceDecl),
+          int(nInterfaceDecls*sizeof(ObjCInterfaceDecl)));
   fprintf(stderr, "    %d instance variable decls, %d each (%d bytes)\n", 
-         nIvarDecls, (int)sizeof(ObjCIvarDecl),
-         int(nIvarDecls*sizeof(ObjCIvarDecl)));
+          nIvarDecls, (int)sizeof(ObjCIvarDecl),
+          int(nIvarDecls*sizeof(ObjCIvarDecl)));
   fprintf(stderr, "    %d class decls, %d each (%d bytes)\n", 
-         nClassDecls, (int)sizeof(ObjCClassDecl),
-         int(nClassDecls*sizeof(ObjCClassDecl)));
+          nClassDecls, (int)sizeof(ObjCClassDecl),
+          int(nClassDecls*sizeof(ObjCClassDecl)));
   fprintf(stderr, "    %d method decls, %d each (%d bytes)\n", 
-         nMethodDecls, (int)sizeof(ObjCMethodDecl),
-         int(nMethodDecls*sizeof(ObjCMethodDecl)));
+          nMethodDecls, (int)sizeof(ObjCMethodDecl),
+          int(nMethodDecls*sizeof(ObjCMethodDecl)));
   fprintf(stderr, "    %d protocol decls, %d each (%d bytes)\n", 
-         nProtocolDecls, (int)sizeof(ObjCProtocolDecl),
-         int(nProtocolDecls*sizeof(ObjCProtocolDecl)));
+          nProtocolDecls, (int)sizeof(ObjCProtocolDecl),
+          int(nProtocolDecls*sizeof(ObjCProtocolDecl)));
   fprintf(stderr, "    %d forward protocol decls, %d each (%d bytes)\n", 
-         nForwardProtocolDecls, (int)sizeof(ObjCForwardProtocolDecl),
-         int(nForwardProtocolDecls*sizeof(ObjCForwardProtocolDecl)));
+          nForwardProtocolDecls, (int)sizeof(ObjCForwardProtocolDecl),
+          int(nForwardProtocolDecls*sizeof(ObjCForwardProtocolDecl)));
   fprintf(stderr, "    %d category decls, %d each (%d bytes)\n", 
-         nCategoryDecls, (int)sizeof(ObjCCategoryDecl),
-         int(nCategoryDecls*sizeof(ObjCCategoryDecl)));
+          nCategoryDecls, (int)sizeof(ObjCCategoryDecl),
+          int(nCategoryDecls*sizeof(ObjCCategoryDecl)));
 
   fprintf(stderr, "    %d class implementation decls, %d each (%d bytes)\n", 
-         nObjCImplementationDecls, (int)sizeof(ObjCImplementationDecl),
-         int(nObjCImplementationDecls*sizeof(ObjCImplementationDecl)));
+          nObjCImplementationDecls, (int)sizeof(ObjCImplementationDecl),
+          int(nObjCImplementationDecls*sizeof(ObjCImplementationDecl)));
 
   fprintf(stderr, "    %d class implementation decls, %d each (%d bytes)\n", 
-         nObjCCategoryImpl, (int)sizeof(ObjCCategoryImplDecl),
-         int(nObjCCategoryImpl*sizeof(ObjCCategoryImplDecl)));
+          nObjCCategoryImpl, (int)sizeof(ObjCCategoryImplDecl),
+          int(nObjCCategoryImpl*sizeof(ObjCCategoryImplDecl)));
 
   fprintf(stderr, "    %d compatibility alias decls, %d each (%d bytes)\n", 
-         nObjCCompatibleAlias, (int)sizeof(ObjCCompatibleAliasDecl),
-         int(nObjCCompatibleAlias*sizeof(ObjCCompatibleAliasDecl)));
+          nObjCCompatibleAlias, (int)sizeof(ObjCCompatibleAliasDecl),
+          int(nObjCCompatibleAlias*sizeof(ObjCCompatibleAliasDecl)));
   
   fprintf(stderr, "    %d property decls, %d each (%d bytes)\n", 
-         nObjCPropertyDecl, (int)sizeof(ObjCPropertyDecl),
-         int(nObjCPropertyDecl*sizeof(ObjCPropertyDecl)));
+          nObjCPropertyDecl, (int)sizeof(ObjCPropertyDecl),
+          int(nObjCPropertyDecl*sizeof(ObjCPropertyDecl)));
   
   fprintf(stderr, "Total bytes = %d\n", 
-         int(nFuncs*sizeof(FunctionDecl)+nBlockVars*sizeof(BlockVarDecl)+
-             nFileVars*sizeof(FileVarDecl)+nParmVars*sizeof(ParmVarDecl)+
-             nFieldDecls*sizeof(FieldDecl)+nSUC*sizeof(RecordDecl)+
-             nEnumDecls*sizeof(EnumDecl)+nEnumConst*sizeof(EnumConstantDecl)+
-             nTypedef*sizeof(TypedefDecl)+
+          int(nFuncs*sizeof(FunctionDecl)+nBlockVars*sizeof(BlockVarDecl)+
+              nFileVars*sizeof(FileVarDecl)+nParmVars*sizeof(ParmVarDecl)+
+              nFieldDecls*sizeof(FieldDecl)+nSUC*sizeof(RecordDecl)+
+              nEnumDecls*sizeof(EnumDecl)+nEnumConst*sizeof(EnumConstantDecl)+
+              nTypedef*sizeof(TypedefDecl)+
               nInterfaceDecls*sizeof(ObjCInterfaceDecl)+
               nIvarDecls*sizeof(ObjCIvarDecl)+
               nClassDecls*sizeof(ObjCClassDecl)+
index fd7768cacc769e7562737edfba8dd99ed6539a4b..c5e8e5ece77fe030abf53b3858ceeaee02d25309 100644 (file)
@@ -70,7 +70,7 @@ void DeclPrinter:: PrintDecl(Decl *D) {
   } else if (ObjCProtocolDecl *PID = dyn_cast<ObjCProtocolDecl>(D)) {
     PrintObjCProtocolDecl(PID);
   } else if (ObjCForwardProtocolDecl *OFPD = 
-            dyn_cast<ObjCForwardProtocolDecl>(D)) {
+             dyn_cast<ObjCForwardProtocolDecl>(D)) {
     Out << "@protocol ";
     for (unsigned i = 0, e = OFPD->getNumForwardDecls(); i != e; ++i) {
       const ObjCProtocolDecl *D = OFPD->getForwardProtocolDecl(i);
@@ -79,16 +79,16 @@ void DeclPrinter:: PrintDecl(Decl *D) {
     }
     Out << ";\n";
   } else if (ObjCImplementationDecl *OID = 
-            dyn_cast<ObjCImplementationDecl>(D)) {
+             dyn_cast<ObjCImplementationDecl>(D)) {
     PrintObjCImplementationDecl(OID);
   } else if (ObjCCategoryImplDecl *OID = 
-            dyn_cast<ObjCCategoryImplDecl>(D)) {
+             dyn_cast<ObjCCategoryImplDecl>(D)) {
     PrintObjCCategoryImplDecl(OID);
   } else if (ObjCCategoryDecl *OID = 
-            dyn_cast<ObjCCategoryDecl>(D)) {
+             dyn_cast<ObjCCategoryDecl>(D)) {
     PrintObjCCategoryDecl(OID);
   } else if (ObjCCompatibleAliasDecl *OID = 
-            dyn_cast<ObjCCompatibleAliasDecl>(D)) {
+             dyn_cast<ObjCCompatibleAliasDecl>(D)) {
     PrintObjCCompatibleAliasDecl(OID);
   } else if (isa<ObjCClassDecl>(D)) {
     Out << "@class [printing todo]\n";
index fa0c9fc43fc28002fcd2609505f2038bffe05fcf..3234f8cf6210a4b2c33f8b5137e543054c358fe0 100644 (file)
@@ -887,7 +887,7 @@ static void InitializeIncludePaths(HeaderSearch &Headers, FileManager &FM,
 
     // Ubuntu 7.10 - Gutsy Gibbon
     AddPath("/usr/lib/gcc/i486-linux-gnu/4.1.3/include", System,
-           false, false, false, Headers);
+            false, false, false, Headers);
 
     AddPath("/usr/include", System, false, false, false, Headers);
     AddPath("/System/Library/Frameworks", System, true, false, true, Headers);
index d8aba9d730f830ca9b5abe9d6888568a2197caf8..8b8d645351561ea5b567213ecfc42f7dbb296895 100644 (file)
@@ -770,7 +770,7 @@ void Parser::ParseStructUnionBody(SourceLocation RecordLoc,
   SourceLocation RBraceLoc = MatchRHSPunctuation(tok::r_brace, LBraceLoc);
   
   Actions.ActOnFields(CurScope,
-                     RecordLoc,TagDecl,&FieldDecls[0],FieldDecls.size(),
+                      RecordLoc,TagDecl,&FieldDecls[0],FieldDecls.size(),
                       LBraceLoc, RBraceLoc);
   
   AttributeList *AttrList = 0;
index 9b33138fbb4c84dad2528a27a7e03edb953783af..808241c80323abfc1bced24312e880835c07e297 100644 (file)
@@ -1715,11 +1715,11 @@ Sema::DeclTy *Sema::ActOnFileScopeAsmDecl(SourceLocation Loc,
 }
 
 Sema::DeclTy* Sema::ActOnLinkageSpec(SourceLocation Loc,
-                                    SourceLocation LBrace,
-                                    SourceLocation RBrace,
-                                    const char *Lang,
-                                    unsigned StrSize,
-                                    DeclTy *D) {
+                                     SourceLocation LBrace,
+                                     SourceLocation RBrace,
+                                     const char *Lang,
+                                     unsigned StrSize,
+                                     DeclTy *D) {
   LinkageSpecDecl::LanguageIDs Language;
   Decl *dcl = static_cast<Decl *>(D);
   if (strncmp(Lang, "\"C\"", StrSize) == 0)
index 6b1d78bb776b5c60f5fee60e64db7f6ef1b81c21..85797a5373e0d57781236de692507f84c90262ca 100644 (file)
@@ -382,7 +382,7 @@ Sema::DeclTy *Sema::ActOnStartClassImplementation(
     // Legacy case of @implementation with no corresponding @interface.
     // Build, chain & install the interface decl into the identifier.
     IDecl = new ObjCInterfaceDecl(AtClassImplLoc, 0, ClassName, 
-                                 false, true);
+                                  false, true);
     IDecl->setNext(ClassName->getFETokenInfo<ScopedDecl>());
     ClassName->setFETokenInfo(IDecl);
     IDecl->setSuperClass(SDecl);
index 3e73930e9b65d6b7fadafaa4d0aa26bff5db07fd..4cf435c331529774fb87a549e285e993a71f71c5 100644 (file)
@@ -275,11 +275,11 @@ Sema::ExprResult Sema::ActOnInstanceMessage(
         if (ObjCImplementationDecl *ImpDecl = 
             ObjCImplementations[ClassDecl->getIdentifier()])
           Method = ImpDecl->getInstanceMethod(Sel);
-         // If we still haven't found a method, look in the global pool. This
-         // behavior isn't very desirable, however we need it for GCC
+          // If we still haven't found a method, look in the global pool. This
+          // behavior isn't very desirable, however we need it for GCC
           // compatibility.
-         if (!Method)
-           Method = InstanceMethodPool[Sel].Method;
+          if (!Method)
+            Method = InstanceMethodPool[Sel].Method;
     }
     if (!Method) {
       Diag(lbrac, diag::warn_method_not_found, std::string("-"), Sel.getName(),
index 1c98cb59a13132a856025734c4e78f8b56feca6c..d986b7e887c8f7b05184655c8e02f81c5a0cd4a4 100644 (file)
@@ -224,7 +224,7 @@ public:
 
   // Return the ObjC type encoding for a given type.
   void getObjCEncodingForType(QualType t, std::string &S, 
-                             llvm::SmallVector<const RecordType *, 8> &RT) const;
+                              llvm::SmallVector<const RecordType *, 8> &RT) const;
   
   // Put the string version of type qualifiers into S.
   void getObjCEncodingForTypeQualifier(Decl::ObjCDeclQualifier QT, 
index b2f6be05671e60bf002305c0441dcbac9ce49e23..e2cb0eb751554fef039bbf98678a3567766a78a7 100644 (file)
@@ -71,7 +71,7 @@ public:
          ObjCMethod,
          ObjCClass,
          ObjCForwardProtocol,
-        LinkageSpec,
+         LinkageSpec,
    FileScopeAsm,
   
     // For each non-leaf class, we now define a mapping to the first/last member
@@ -678,7 +678,7 @@ public:
   EnumDecl(SourceLocation L, IdentifierInfo *Id, ScopedDecl *PrevDecl)
     : TagDecl(Enum, L, Id, PrevDecl) {
     ElementList = 0;
-       IntegerType = QualType();
+        IntegerType = QualType();
   }
   
   /// defineElements - When created, EnumDecl correspond to a forward declared
@@ -804,7 +804,7 @@ public:
   /// ensure a stable abi for this, we choose the DW_LANG_ encodings
   /// from the dwarf standard.
   enum LanguageIDs { lang_c = /* DW_LANG_C */ 0x0002,
-                    lang_cxx = /* DW_LANG_C_plus_plus */ 0x0004 };
+                     lang_cxx = /* DW_LANG_C_plus_plus */ 0x0004 };
 private:
   /// Language - The language for this linkage specification.
   LanguageIDs Language;
index 0b5338e7313226fa3c55fb46fbc6d29a6decf39f..5ba0744b75448d2cfc837da61dbbdfb0c624df40 100644 (file)
@@ -295,24 +295,24 @@ public:
   }
   ObjCIvarDecl *lookupInstanceVariable(IdentifierInfo *ivarName,
                                        ObjCInterfaceDecl *&clsDeclared);
-                                                                          
+                                                                           
   // Get the local instance method declared in this interface.
   ObjCMethodDecl *getInstanceMethod(Selector &Sel) {
     for (instmeth_iterator I = instmeth_begin(), E = instmeth_end(); 
-            I != E; ++I) {
+             I != E; ++I) {
       if ((*I)->getSelector() == Sel)
         return *I;
     }
-       return 0;
+        return 0;
   }
   // Get the local class method declared in this interface.
   ObjCMethodDecl *getClassMethod(Selector &Sel) {
     for (classmeth_iterator I = classmeth_begin(), E = classmeth_end(); 
-            I != E; ++I) {
+             I != E; ++I) {
       if ((*I)->getSelector() == Sel)
         return *I;
     }
-       return 0;
+        return 0;
   }
   // Lookup a method. First, we search locally. If a method isn't
   // found, we search referenced protocols and class categories.
@@ -466,20 +466,20 @@ public:
   // Get the local instance method declared in this interface.
   ObjCMethodDecl *getInstanceMethod(Selector &Sel) {
     for (instmeth_iterator I = instmeth_begin(), E = instmeth_end(); 
-            I != E; ++I) {
+             I != E; ++I) {
       if ((*I)->getSelector() == Sel)
         return *I;
     }
-       return 0;
+        return 0;
   }
   // Get the local class method declared in this interface.
   ObjCMethodDecl *getClassMethod(Selector &Sel) {
     for (classmeth_iterator I = classmeth_begin(), E = classmeth_end(); 
-            I != E; ++I) {
+             I != E; ++I) {
       if ((*I)->getSelector() == Sel)
         return *I;
     }
-       return 0;
+        return 0;
   }
   
   // Lookup a method. First, we search locally. If a method isn't
@@ -656,20 +656,20 @@ public:
   // Get the local instance method declared in this interface.
   ObjCMethodDecl *getInstanceMethod(Selector &Sel) {
     for (instmeth_iterator I = instmeth_begin(), E = instmeth_end(); 
-            I != E; ++I) {
+             I != E; ++I) {
       if ((*I)->getSelector() == Sel)
         return *I;
     }
-       return 0;
+        return 0;
   }
   // Get the local class method declared in this interface.
   ObjCMethodDecl *getClassMethod(Selector &Sel) {
     for (classmeth_iterator I = classmeth_begin(), E = classmeth_end(); 
-            I != E; ++I) {
+             I != E; ++I) {
       if ((*I)->getSelector() == Sel)
         return *I;
     }
-       return 0;
+        return 0;
   }
   
   void addMethods(ObjCMethodDecl **insMethods, unsigned numInsMembers,
index 003dd9e01b90e8f5be58392ac3a1531bc2420505..281b9b7be8e5e404d9da455fad1319eb23a73183 100644 (file)
@@ -160,8 +160,8 @@ public:
   }
 
   virtual DeclTy *ActOnLinkageSpec(SourceLocation Loc, SourceLocation LBrace,
-                                  SourceLocation RBrace, const char *Lang,
-                                  unsigned StrSize, DeclTy *D) {
+                                   SourceLocation RBrace, const char *Lang,
+                                   unsigned StrSize, DeclTy *D) {
     return 0;
   }
   
index a12f52cb4a60438a1dd2048d7358f0441292e3b2..68c7457a51a85ca2c5bfd0491b3b1b1cf4fb2605 100644 (file)
@@ -269,7 +269,7 @@ private:
   bool ParseObjCProtocolReferences(llvm::SmallVectorImpl<IdentifierInfo*> &,
                                    SourceLocation &endProtoLoc);
   void ParseObjCInterfaceDeclList(DeclTy *interfaceDecl,
-                                 tok::ObjCKeywordKind contextKey);
+                                  tok::ObjCKeywordKind contextKey);
   DeclTy *ParseObjCAtProtocolDeclaration(SourceLocation atLoc);
   
   DeclTy *ObjCImpDecl;
@@ -301,7 +301,7 @@ private:
   TypeTy *ParseObjCTypeName(ObjCDeclSpec &DS);
   void ParseObjCMethodRequirement();
   DeclTy *ParseObjCMethodPrototype(DeclTy *classOrCat,
-           tok::ObjCKeywordKind MethodImplKind = tok::objc_not_keyword);
+            tok::ObjCKeywordKind MethodImplKind = tok::objc_not_keyword);
   DeclTy *ParseObjCMethodDecl(SourceLocation mLoc, tok::TokenKind mType,
                               DeclTy *classDecl,
             tok::ObjCKeywordKind MethodImplKind = tok::objc_not_keyword);