From c81c8144a661a49d7b9dae8d2080dee2e43186ec Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 25 Feb 2008 21:04:36 +0000 Subject: [PATCH] convert tabs to spaces, patch by Mike Stump! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47560 91177308-0d34-0410-b5e6-96231b3b80d8 --- AST/Decl.cpp | 92 +++++++++++++++++----------------- Driver/ASTConsumers.cpp | 10 ++-- Driver/clang.cpp | 2 +- Parse/ParseDecl.cpp | 2 +- Sema/SemaDecl.cpp | 10 ++-- Sema/SemaDeclObjC.cpp | 2 +- Sema/SemaExprObjC.cpp | 8 +-- include/clang/AST/ASTContext.h | 2 +- include/clang/AST/Decl.h | 6 +-- include/clang/AST/DeclObjC.h | 26 +++++----- include/clang/Parse/Action.h | 4 +- include/clang/Parse/Parser.h | 4 +- 12 files changed, 84 insertions(+), 84 deletions(-) diff --git a/AST/Decl.cpp b/AST/Decl.cpp index 5d68927b82..05cd49021b 100644 --- a/AST/Decl.cpp +++ b/AST/Decl.cpp @@ -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)+ diff --git a/Driver/ASTConsumers.cpp b/Driver/ASTConsumers.cpp index fd7768cacc..c5e8e5ece7 100644 --- a/Driver/ASTConsumers.cpp +++ b/Driver/ASTConsumers.cpp @@ -70,7 +70,7 @@ void DeclPrinter:: PrintDecl(Decl *D) { } else if (ObjCProtocolDecl *PID = dyn_cast(D)) { PrintObjCProtocolDecl(PID); } else if (ObjCForwardProtocolDecl *OFPD = - dyn_cast(D)) { + dyn_cast(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(D)) { + dyn_cast(D)) { PrintObjCImplementationDecl(OID); } else if (ObjCCategoryImplDecl *OID = - dyn_cast(D)) { + dyn_cast(D)) { PrintObjCCategoryImplDecl(OID); } else if (ObjCCategoryDecl *OID = - dyn_cast(D)) { + dyn_cast(D)) { PrintObjCCategoryDecl(OID); } else if (ObjCCompatibleAliasDecl *OID = - dyn_cast(D)) { + dyn_cast(D)) { PrintObjCCompatibleAliasDecl(OID); } else if (isa(D)) { Out << "@class [printing todo]\n"; diff --git a/Driver/clang.cpp b/Driver/clang.cpp index fa0c9fc43f..3234f8cf62 100644 --- a/Driver/clang.cpp +++ b/Driver/clang.cpp @@ -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); diff --git a/Parse/ParseDecl.cpp b/Parse/ParseDecl.cpp index d8aba9d730..8b8d645351 100644 --- a/Parse/ParseDecl.cpp +++ b/Parse/ParseDecl.cpp @@ -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; diff --git a/Sema/SemaDecl.cpp b/Sema/SemaDecl.cpp index 9b33138fbb..808241c803 100644 --- a/Sema/SemaDecl.cpp +++ b/Sema/SemaDecl.cpp @@ -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(D); if (strncmp(Lang, "\"C\"", StrSize) == 0) diff --git a/Sema/SemaDeclObjC.cpp b/Sema/SemaDeclObjC.cpp index 6b1d78bb77..85797a5373 100644 --- a/Sema/SemaDeclObjC.cpp +++ b/Sema/SemaDeclObjC.cpp @@ -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()); ClassName->setFETokenInfo(IDecl); IDecl->setSuperClass(SDecl); diff --git a/Sema/SemaExprObjC.cpp b/Sema/SemaExprObjC.cpp index 3e73930e9b..4cf435c331 100644 --- a/Sema/SemaExprObjC.cpp +++ b/Sema/SemaExprObjC.cpp @@ -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(), diff --git a/include/clang/AST/ASTContext.h b/include/clang/AST/ASTContext.h index 1c98cb59a1..d986b7e887 100644 --- a/include/clang/AST/ASTContext.h +++ b/include/clang/AST/ASTContext.h @@ -224,7 +224,7 @@ public: // Return the ObjC type encoding for a given type. void getObjCEncodingForType(QualType t, std::string &S, - llvm::SmallVector &RT) const; + llvm::SmallVector &RT) const; // Put the string version of type qualifiers into S. void getObjCEncodingForTypeQualifier(Decl::ObjCDeclQualifier QT, diff --git a/include/clang/AST/Decl.h b/include/clang/AST/Decl.h index b2f6be0567..e2cb0eb751 100644 --- a/include/clang/AST/Decl.h +++ b/include/clang/AST/Decl.h @@ -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; diff --git a/include/clang/AST/DeclObjC.h b/include/clang/AST/DeclObjC.h index 0b5338e731..5ba0744b75 100644 --- a/include/clang/AST/DeclObjC.h +++ b/include/clang/AST/DeclObjC.h @@ -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, diff --git a/include/clang/Parse/Action.h b/include/clang/Parse/Action.h index 003dd9e01b..281b9b7be8 100644 --- a/include/clang/Parse/Action.h +++ b/include/clang/Parse/Action.h @@ -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; } diff --git a/include/clang/Parse/Parser.h b/include/clang/Parse/Parser.h index a12f52cb4a..68c7457a51 100644 --- a/include/clang/Parse/Parser.h +++ b/include/clang/Parse/Parser.h @@ -269,7 +269,7 @@ private: bool ParseObjCProtocolReferences(llvm::SmallVectorImpl &, 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); -- 2.40.0