diff options
author | Fangrui Song <maskray@google.com> | 2018-07-30 19:24:48 +0000 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2018-07-30 19:24:48 +0000 |
commit | 6907ce2f8f7410b179beb6e2db9c8d16a257ce9f (patch) | |
tree | 31081ac1b3df5965102999757410e052925e03af /clang/lib/Serialization/ASTWriterDecl.cpp | |
parent | ce9b3e084c43e99fbcfeb730ddb5fd0e575d5237 (diff) | |
download | bcm5719-llvm-6907ce2f8f7410b179beb6e2db9c8d16a257ce9f.tar.gz bcm5719-llvm-6907ce2f8f7410b179beb6e2db9c8d16a257ce9f.zip |
Remove trailing space
sed -Ei 's/[[:space:]]+$//' include/**/*.{def,h,td} lib/**/*.{cpp,h}
llvm-svn: 338291
Diffstat (limited to 'clang/lib/Serialization/ASTWriterDecl.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTWriterDecl.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/clang/lib/Serialization/ASTWriterDecl.cpp b/clang/lib/Serialization/ASTWriterDecl.cpp index 77e578f6bc5..7286f2cac17 100644 --- a/clang/lib/Serialization/ASTWriterDecl.cpp +++ b/clang/lib/Serialization/ASTWriterDecl.cpp @@ -271,7 +271,7 @@ void ASTDeclWriter::Visit(Decl *D) { // Handle FunctionDecl's body here and write it after all other Stmts/Exprs // have been written. We want it last because we will not read it back when - // retrieving it from the AST, we'll just lazily set the offset. + // retrieving it from the AST, we'll just lazily set the offset. if (FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) { Record.push_back(FD->doesThisDeclarationHaveABody()); if (FD->doesThisDeclarationHaveABody()) @@ -526,10 +526,10 @@ void ASTDeclWriter::VisitFunctionDecl(FunctionDecl *D) { VisitDeclaratorDecl(D); Record.AddDeclarationNameLoc(D->DNLoc, D->getDeclName()); Record.push_back(D->getIdentifierNamespace()); - + // FunctionDecl's body is handled last at ASTWriterDecl::Visit, // after everything else is written. - + Record.push_back((int)D->SClass); // FIXME: stable encoding Record.push_back(D->IsInline); Record.push_back(D->IsInlineSpecified); @@ -576,10 +576,10 @@ void ASTDeclWriter::VisitFunctionDecl(FunctionDecl *D) { Record.AddDeclRef(FTSInfo->getTemplate()); Record.push_back(FTSInfo->getTemplateSpecializationKind()); - + // Template arguments. Record.AddTemplateArgumentList(FTSInfo->TemplateArguments); - + // Template args as written. Record.push_back(FTSInfo->TemplateArgumentsAsWritten != nullptr); if (FTSInfo->TemplateArgumentsAsWritten) { @@ -591,7 +591,7 @@ void ASTDeclWriter::VisitFunctionDecl(FunctionDecl *D) { Record.AddSourceLocation(FTSInfo->TemplateArgumentsAsWritten->LAngleLoc); Record.AddSourceLocation(FTSInfo->TemplateArgumentsAsWritten->RAngleLoc); } - + Record.AddSourceLocation(FTSInfo->getPointOfInstantiation()); if (D->isCanonicalDecl()) { @@ -604,12 +604,12 @@ void ASTDeclWriter::VisitFunctionDecl(FunctionDecl *D) { case FunctionDecl::TK_DependentFunctionTemplateSpecialization: { DependentFunctionTemplateSpecializationInfo * DFTSInfo = D->getDependentSpecializationInfo(); - + // Templates. Record.push_back(DFTSInfo->getNumTemplates()); for (int i=0, e = DFTSInfo->getNumTemplates(); i != e; ++i) Record.AddDeclRef(DFTSInfo->getTemplate(i)); - + // Templates args. Record.push_back(DFTSInfo->getNumTemplateArgs()); for (int i=0, e = DFTSInfo->getNumTemplateArgs(); i != e; ++i) @@ -707,7 +707,7 @@ void ASTDeclWriter::VisitObjCInterfaceDecl(ObjCInterfaceDecl *D) { if (D->isThisDeclarationADefinition()) { // Write the DefinitionData ObjCInterfaceDecl::DefinitionData &Data = D->data(); - + Record.AddTypeSourceInfo(D->getSuperClassTInfo()); Record.AddSourceLocation(D->getEndOfDefinitionLoc()); Record.push_back(Data.HasDesignatedInitializers); @@ -718,7 +718,7 @@ void ASTDeclWriter::VisitObjCInterfaceDecl(ObjCInterfaceDecl *D) { Record.AddDeclRef(P); for (const auto &PL : D->protocol_locs()) Record.AddSourceLocation(PL); - + // Write out the protocols that are transitively referenced. Record.push_back(Data.AllReferencedProtocols.size()); for (ObjCList<ObjCProtocolDecl>::iterator @@ -727,17 +727,17 @@ void ASTDeclWriter::VisitObjCInterfaceDecl(ObjCInterfaceDecl *D) { P != PEnd; ++P) Record.AddDeclRef(*P); - + if (ObjCCategoryDecl *Cat = D->getCategoryListRaw()) { // Ensure that we write out the set of categories for this class. Writer.ObjCClassesWithCategories.insert(D); - + // Make sure that the categories get serialized. for (; Cat; Cat = Cat->getNextClassCategoryRaw()) (void)Writer.GetDeclRef(Cat); } - } - + } + Code = serialization::DECL_OBJC_INTERFACE; } @@ -765,7 +765,7 @@ void ASTDeclWriter::VisitObjCIvarDecl(ObjCIvarDecl *D) { void ASTDeclWriter::VisitObjCProtocolDecl(ObjCProtocolDecl *D) { VisitRedeclarable(D); VisitObjCContainerDecl(D); - + Record.push_back(D->isThisDeclarationADefinition()); if (D->isThisDeclarationADefinition()) { Record.push_back(D->protocol_size()); @@ -774,7 +774,7 @@ void ASTDeclWriter::VisitObjCProtocolDecl(ObjCProtocolDecl *D) { for (const auto &PL : D->protocol_locs()) Record.AddSourceLocation(PL); } - + Code = serialization::DECL_OBJC_PROTOCOL; } @@ -964,7 +964,7 @@ void ASTDeclWriter::VisitVarDecl(VarDecl *D) { if (ModulesCodegen) Writer.ModularCodegenDecls.push_back(Writer.GetDeclRef(D)); } - + enum { VarNotTemplate = 0, VarTemplate, StaticDataMemberSpecialization }; @@ -1158,7 +1158,7 @@ void ASTDeclWriter::VisitNamespaceDecl(NamespaceDecl *D) { Record.AddDeclRef(D->getAnonymousNamespace()); Code = serialization::DECL_NAMESPACE; - if (Writer.hasChain() && D->isAnonymousNamespace() && + if (Writer.hasChain() && D->isAnonymousNamespace() && D == D->getMostRecentDecl()) { // This is a most recent reopening of the anonymous namespace. If its parent // is in a previous PCH (or is the TU), mark that parent for update, because @@ -1412,7 +1412,7 @@ void ASTDeclWriter::VisitRedeclarableTemplateDecl(RedeclarableTemplateDecl *D) { if (D->getInstantiatedFromMemberTemplate()) Record.push_back(D->isMemberSpecialization()); } - + VisitTemplateDecl(D); Record.push_back(D->getIdentifierNamespace()); } @@ -1447,7 +1447,7 @@ void ASTDeclWriter::VisitClassTemplateSpecializationDecl( Record.push_back(D->isCanonicalDecl()); if (D->isCanonicalDecl()) { - // When reading, we'll add it to the folding set of the following template. + // When reading, we'll add it to the folding set of the following template. Record.AddDeclRef(D->getSpecializedTemplate()->getCanonicalDecl()); } @@ -1573,18 +1573,18 @@ void ASTDeclWriter::VisitNonTypeTemplateParmDecl(NonTypeTemplateParmDecl *D) { // memory. if (D->isExpandedParameterPack()) Record.push_back(D->getNumExpansionTypes()); - + VisitDeclaratorDecl(D); // TemplateParmPosition. Record.push_back(D->getDepth()); Record.push_back(D->getPosition()); - + if (D->isExpandedParameterPack()) { for (unsigned I = 0, N = D->getNumExpansionTypes(); I != N; ++I) { Record.AddTypeRef(D->getExpansionType(I)); Record.AddTypeSourceInfo(D->getExpansionTypeSourceInfo(I)); } - + Code = serialization::DECL_EXPANDED_NON_TYPE_TEMPLATE_PARM_PACK; } else { // Rest of NonTypeTemplateParmDecl. @@ -1709,7 +1709,7 @@ void ASTDeclWriter::VisitRedeclarable(Redeclarable<T> *D) { Record.AddDeclRef(FirstLocal); } - // Make sure that we serialize both the previous and the most-recent + // Make sure that we serialize both the previous and the most-recent // declarations, which (transitively) ensures that all declarations in the // chain get serialized. // @@ -2252,11 +2252,11 @@ void ASTWriter::WriteDecl(ASTContext &Context, Decl *D) { serialization::DeclID &IDR = DeclIDs[D]; if (IDR == 0) IDR = NextDeclID++; - + ID = IDR; assert(ID >= FirstDeclID && "invalid decl ID"); - + RecordData Record; ASTDeclWriter W(*this, Context, Record); |