From: Fariborz Jahanian Date: Thu, 4 Oct 2007 00:45:27 +0000 (+0000) Subject: Fixed tabs in couple of sources. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3f5faf7c28a51d920b043fa69e268c6fad78caf8;p=clang Fixed tabs in couple of sources. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42601 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/AST/Decl.cpp b/AST/Decl.cpp index 8c9638c5c9..e8b57d46a9 100644 --- a/AST/Decl.cpp +++ b/AST/Decl.cpp @@ -76,7 +76,7 @@ const char *Decl::getDeclKindName() const { bool Decl::CollectingStats(bool enable) { if (enable) StatSwitch = true; - return StatSwitch; + return StatSwitch; } void Decl::PrintStats() { @@ -263,7 +263,7 @@ void RecordDecl::defineBody(FieldDecl **members, unsigned numMembers) { FieldDecl* RecordDecl::getMember(IdentifierInfo *name) { if (Members == 0 || NumMembers < 0) return 0; - + // linear search. When C++ classes come along, will likely need to revisit. for (int i = 0; i < NumMembers; ++i) { if (Members[i]->getIdentifier() == name) @@ -305,7 +305,7 @@ void ObjcInterfaceDecl::ObjcAddInstanceVariablesToClass(ObjcIvarDecl **ivars, /// Ivars into ObjcImplementationDecl's fields. /// void ObjcImplementationDecl::ObjcAddInstanceVariablesToClassImpl( - ObjcIvarDecl **ivars, unsigned numIvars) { + ObjcIvarDecl **ivars, unsigned numIvars) { NumIvars = numIvars; if (numIvars) { Ivars = new ObjcIvarDecl*[numIvars]; diff --git a/Sema/SemaDecl.cpp b/Sema/SemaDecl.cpp index 6bd05952c4..2c7554b778 100644 --- a/Sema/SemaDecl.cpp +++ b/Sema/SemaDecl.cpp @@ -100,11 +100,11 @@ ObjcInterfaceDecl *Sema::getObjCInterfaceDecl(IdentifierInfo *Id) { /// getObjcProtocolDecl - Look up a for a protocol declaration in the scope. /// return 0 if one not found. ObjcProtocolDecl *Sema::getObjCProtocolDecl(Scope *S, - IdentifierInfo *Id, - SourceLocation IdLoc) { + IdentifierInfo *Id, + SourceLocation IdLoc) { // Note that Protocols have their own namespace. ScopedDecl *PrDecl = LookupScopedDecl(Id, Decl::IDNS_Protocol, - IdLoc, S); + IdLoc, S); if (PrDecl && !isa(PrDecl)) PrDecl = 0; return cast_or_null(static_cast(PrDecl)); @@ -956,7 +956,7 @@ Sema::DeclTy *Sema::ActOnStartClassInterface(Scope* S, /// Check then save referenced protocols for (unsigned int i = 0; i != NumProtocols; i++) { ObjcProtocolDecl* RefPDecl = getObjCProtocolDecl(S, ProtocolNames[i], - ClassLoc); + ClassLoc); if (!RefPDecl || RefPDecl->isForwardDecl()) Diag(ClassLoc, diag::err_undef_protocolref, ProtocolNames[i]->getName(), @@ -968,7 +968,7 @@ Sema::DeclTy *Sema::ActOnStartClassInterface(Scope* S, } Sema::DeclTy *Sema::ActOnStartProtocolInterface(Scope* S, - SourceLocation AtProtoInterfaceLoc, + SourceLocation AtProtoInterfaceLoc, IdentifierInfo *ProtocolName, SourceLocation ProtocolLoc, IdentifierInfo **ProtoRefNames, unsigned NumProtoRefs) { assert(ProtocolName && "Missing protocol identifier"); @@ -995,10 +995,10 @@ Sema::DeclTy *Sema::ActOnStartProtocolInterface(Scope* S, /// Check then save referenced protocols for (unsigned int i = 0; i != NumProtoRefs; i++) { ObjcProtocolDecl* RefPDecl = getObjCProtocolDecl(S, ProtoRefNames[i], - ProtocolLoc); + ProtocolLoc); if (!RefPDecl || RefPDecl->isForwardDecl()) Diag(ProtocolLoc, diag::err_undef_protocolref, - ProtoRefNames[i]->getName(), + ProtoRefNames[i]->getName(), ProtocolName->getName()); PDecl->setReferencedProtocols((int)i, RefPDecl); } @@ -1032,7 +1032,7 @@ Sema::ActOnForwardProtocolDeclaration(Scope *S, SourceLocation AtProtocolLoc, } Sema::DeclTy *Sema::ActOnStartCategoryInterface(Scope* S, - SourceLocation AtInterfaceLoc, + SourceLocation AtInterfaceLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *CategoryName, SourceLocation CategoryLoc, IdentifierInfo **ProtoRefNames, unsigned NumProtoRefs) { @@ -1064,10 +1064,10 @@ Sema::DeclTy *Sema::ActOnStartCategoryInterface(Scope* S, /// Check then save referenced protocols for (unsigned int i = 0; i != NumProtoRefs; i++) { ObjcProtocolDecl* RefPDecl = getObjCProtocolDecl(S, ProtoRefNames[i], - CategoryLoc); + CategoryLoc); if (!RefPDecl || RefPDecl->isForwardDecl()) Diag(CategoryLoc, diag::err_undef_protocolref, - ProtoRefNames[i]->getName(), + ProtoRefNames[i]->getName(), CategoryName->getName()); CDecl->setCatReferencedProtocols((int)i, RefPDecl); } @@ -1517,7 +1517,7 @@ Sema::DeclTy *Sema::ActOnField(Scope *S, DeclTy *TagDecl, if (isa(static_cast(TagDecl))) NewFD = new FieldDecl(Loc, II, T); else if (isa(static_cast(TagDecl)) - || isa(static_cast(TagDecl))) + || isa(static_cast(TagDecl))) NewFD = new ObjcIvarDecl(Loc, II, T); else assert(0 && "Sema::ActOnField(): Unknown TagDecl"); @@ -1541,7 +1541,7 @@ TranslateIvarVisibility(tok::ObjCKeywordKind ivarVisibility) { } void Sema::ActOnFields(Scope* S, - SourceLocation RecLoc, DeclTy *RecDecl, + SourceLocation RecLoc, DeclTy *RecDecl, DeclTy **Fields, unsigned NumFields, tok::ObjCKeywordKind *visibility) { Decl *EnclosingDecl = static_cast(RecDecl); @@ -1591,10 +1591,10 @@ void Sema::ActOnFields(Scope* S, // C99 6.7.2.1p2 - A field may not be an incomplete type except... if (FDTy->isIncompleteType()) { if (!Record) { // Incomplete ivar type is always an error. - Diag(FD->getLocation(), diag::err_field_incomplete, FD->getName()); + Diag(FD->getLocation(), diag::err_field_incomplete, FD->getName()); FD->setInvalidDecl(); EnclosingDecl->setInvalidDecl(); - continue; + continue; } if (i != NumFields-1 || // ... that the last member ... Record->getKind() != Decl::Struct || // ... of a structure ... @@ -1637,7 +1637,7 @@ void Sema::ActOnFields(Scope* S, // as an extension. Diag(FD->getLocation(), diag::ext_flexible_array_in_struct, FD->getName()); - if (Record) + if (Record) Record->setHasFlexibleArrayMember(true); } } @@ -1676,7 +1676,7 @@ void Sema::ActOnFields(Scope* S, ObjcAddInstanceVariablesToClass(ClsFields, RecFields.size()); else if (isa(static_cast(RecDecl))) { ObjcImplementationDecl* IMPDecl = - cast(static_cast(RecDecl)); + cast(static_cast(RecDecl)); assert(IMPDecl && "ActOnFields - missing ObjcImplementationDecl"); IMPDecl->ObjcAddInstanceVariablesToClassImpl(ClsFields, RecFields.size()); CheckImplementationIvars(IMPDecl, ClsFields, RecFields.size()); @@ -1763,17 +1763,17 @@ Sema::DeclTy *Sema::ActOnMethodDeclaration(SourceLocation MethodLoc, for (unsigned i = 0; i < Sel.getNumArgs(); i++) { // FIXME: arg->AttrList must be stored too! ParmVarDecl* Param = new ParmVarDecl(SourceLocation(/*FIXME*/), ArgNames[i], - QualType::getFromOpaquePtr(ArgTypes[i]), - VarDecl::None, 0); + QualType::getFromOpaquePtr(ArgTypes[i]), + VarDecl::None, 0); Params.push_back(Param); } QualType resultDeclType = QualType::getFromOpaquePtr(ReturnType); ObjcMethodDecl* ObjcMethod = new ObjcMethodDecl(MethodLoc, Sel, resultDeclType, 0, -1, AttrList, MethodType == tok::minus, - MethodDeclKind == tok::objc_optional ? - ObjcMethodDecl::Optional : - ObjcMethodDecl::Required); + MethodDeclKind == tok::objc_optional ? + ObjcMethodDecl::Optional : + ObjcMethodDecl::Required); ObjcMethod->setMethodParams(&Params[0], Sel.getNumArgs()); return ObjcMethod; }