Loading clang/include/clang/AST/DeclCXX.h +1 −3 Original line number Diff line number Diff line Loading @@ -3041,9 +3041,7 @@ public: /// Implicit declaration of a temporary that was materialized by /// a MaterializeTemporaryExpr and lifetime-extended by a declaration class LifetimeExtendedTemporaryDecl final : public Decl, public Mergeable<LifetimeExtendedTemporaryDecl> { class LifetimeExtendedTemporaryDecl final : public Decl { friend class MaterializeTemporaryExpr; friend class ASTDeclReader; Loading clang/include/clang/AST/TextNodeDumper.h +0 −2 Original line number Diff line number Diff line Loading @@ -346,8 +346,6 @@ public: void VisitObjCPropertyImplDecl(const ObjCPropertyImplDecl *D); void VisitBlockDecl(const BlockDecl *D); void VisitConceptDecl(const ConceptDecl *D); void VisitLifetimeExtendedTemporaryDecl(const LifetimeExtendedTemporaryDecl *D); }; } // namespace clang Loading clang/include/clang/Serialization/ASTReader.h +0 −8 Original line number Diff line number Diff line Loading @@ -551,14 +551,6 @@ private: llvm::DenseMap<Decl*, llvm::SmallVector<NamedDecl*, 2>> AnonymousDeclarationsForMerging; /// Key used to identify LifetimeExtendedTemporaryDecl for merging, /// containing the lifetime-extending declaration and the mangling number. using LETemporaryKey = std::pair<Decl *, unsigned>; /// Map of already deserialiazed temporaries. llvm::DenseMap<LETemporaryKey, LifetimeExtendedTemporaryDecl *> LETemporaryForMerging; struct FileDeclsInfo { ModuleFile *Mod = nullptr; ArrayRef<serialization::LocalDeclID> Decls; Loading clang/lib/AST/TextNodeDumper.cpp +0 −11 Original line number Diff line number Diff line Loading @@ -1338,17 +1338,6 @@ void TextNodeDumper::VisitFunctionDecl(const FunctionDecl *D) { OS << " <<<NULL params x " << D->getNumParams() << ">>>"; } void TextNodeDumper::VisitLifetimeExtendedTemporaryDecl( const LifetimeExtendedTemporaryDecl *D) { OS << " extended by "; dumpBareDeclRef(D->getExtendingDecl()); OS << " mangling "; { ColorScope Color(OS, ShowColors, ValueColor); OS << D->getManglingNumber(); } } void TextNodeDumper::VisitFieldDecl(const FieldDecl *D) { dumpName(D); dumpType(D->getType()); Loading clang/lib/Serialization/ASTReaderDecl.cpp +0 −22 Original line number Diff line number Diff line Loading @@ -424,8 +424,6 @@ namespace clang { template<typename T> void mergeMergeable(Mergeable<T> *D); void mergeMergeable(LifetimeExtendedTemporaryDecl *D); void mergeTemplatePattern(RedeclarableTemplateDecl *D, RedeclarableTemplateDecl *Existing, DeclID DsID, bool IsKeyDecl); Loading Loading @@ -2360,7 +2358,6 @@ void ASTDeclReader::VisitLifetimeExtendedTemporaryDecl( if (Record.readInt()) D->Value = new (D->getASTContext()) APValue(Record.readAPValue()); D->ManglingNumber = Record.readInt(); mergeMergeable(D); } std::pair<uint64_t, uint64_t> Loading Loading @@ -2558,25 +2555,6 @@ static bool allowODRLikeMergeInC(NamedDecl *ND) { return false; } /// Attempts to merge LifetimeExtendedTemporaryDecl with /// identical class definitions from two different modules. void ASTDeclReader::mergeMergeable(LifetimeExtendedTemporaryDecl *D) { // If modules are not available, there is no reason to perform this merge. if (!Reader.getContext().getLangOpts().Modules) return; LifetimeExtendedTemporaryDecl *LETDecl = D; LifetimeExtendedTemporaryDecl *&LookupResult = Reader.LETemporaryForMerging[std::make_pair( LETDecl->getExtendingDecl(), LETDecl->getManglingNumber())]; if (LookupResult) Reader.getContext().setPrimaryMergedDecl(LETDecl, LookupResult->getCanonicalDecl()); else LookupResult = LETDecl; } /// Attempts to merge the given declaration (D) with another declaration /// of the same entity, for the case where the entity is not actually /// redeclarable. This happens, for instance, when merging the fields of Loading Loading
clang/include/clang/AST/DeclCXX.h +1 −3 Original line number Diff line number Diff line Loading @@ -3041,9 +3041,7 @@ public: /// Implicit declaration of a temporary that was materialized by /// a MaterializeTemporaryExpr and lifetime-extended by a declaration class LifetimeExtendedTemporaryDecl final : public Decl, public Mergeable<LifetimeExtendedTemporaryDecl> { class LifetimeExtendedTemporaryDecl final : public Decl { friend class MaterializeTemporaryExpr; friend class ASTDeclReader; Loading
clang/include/clang/AST/TextNodeDumper.h +0 −2 Original line number Diff line number Diff line Loading @@ -346,8 +346,6 @@ public: void VisitObjCPropertyImplDecl(const ObjCPropertyImplDecl *D); void VisitBlockDecl(const BlockDecl *D); void VisitConceptDecl(const ConceptDecl *D); void VisitLifetimeExtendedTemporaryDecl(const LifetimeExtendedTemporaryDecl *D); }; } // namespace clang Loading
clang/include/clang/Serialization/ASTReader.h +0 −8 Original line number Diff line number Diff line Loading @@ -551,14 +551,6 @@ private: llvm::DenseMap<Decl*, llvm::SmallVector<NamedDecl*, 2>> AnonymousDeclarationsForMerging; /// Key used to identify LifetimeExtendedTemporaryDecl for merging, /// containing the lifetime-extending declaration and the mangling number. using LETemporaryKey = std::pair<Decl *, unsigned>; /// Map of already deserialiazed temporaries. llvm::DenseMap<LETemporaryKey, LifetimeExtendedTemporaryDecl *> LETemporaryForMerging; struct FileDeclsInfo { ModuleFile *Mod = nullptr; ArrayRef<serialization::LocalDeclID> Decls; Loading
clang/lib/AST/TextNodeDumper.cpp +0 −11 Original line number Diff line number Diff line Loading @@ -1338,17 +1338,6 @@ void TextNodeDumper::VisitFunctionDecl(const FunctionDecl *D) { OS << " <<<NULL params x " << D->getNumParams() << ">>>"; } void TextNodeDumper::VisitLifetimeExtendedTemporaryDecl( const LifetimeExtendedTemporaryDecl *D) { OS << " extended by "; dumpBareDeclRef(D->getExtendingDecl()); OS << " mangling "; { ColorScope Color(OS, ShowColors, ValueColor); OS << D->getManglingNumber(); } } void TextNodeDumper::VisitFieldDecl(const FieldDecl *D) { dumpName(D); dumpType(D->getType()); Loading
clang/lib/Serialization/ASTReaderDecl.cpp +0 −22 Original line number Diff line number Diff line Loading @@ -424,8 +424,6 @@ namespace clang { template<typename T> void mergeMergeable(Mergeable<T> *D); void mergeMergeable(LifetimeExtendedTemporaryDecl *D); void mergeTemplatePattern(RedeclarableTemplateDecl *D, RedeclarableTemplateDecl *Existing, DeclID DsID, bool IsKeyDecl); Loading Loading @@ -2360,7 +2358,6 @@ void ASTDeclReader::VisitLifetimeExtendedTemporaryDecl( if (Record.readInt()) D->Value = new (D->getASTContext()) APValue(Record.readAPValue()); D->ManglingNumber = Record.readInt(); mergeMergeable(D); } std::pair<uint64_t, uint64_t> Loading Loading @@ -2558,25 +2555,6 @@ static bool allowODRLikeMergeInC(NamedDecl *ND) { return false; } /// Attempts to merge LifetimeExtendedTemporaryDecl with /// identical class definitions from two different modules. void ASTDeclReader::mergeMergeable(LifetimeExtendedTemporaryDecl *D) { // If modules are not available, there is no reason to perform this merge. if (!Reader.getContext().getLangOpts().Modules) return; LifetimeExtendedTemporaryDecl *LETDecl = D; LifetimeExtendedTemporaryDecl *&LookupResult = Reader.LETemporaryForMerging[std::make_pair( LETDecl->getExtendingDecl(), LETDecl->getManglingNumber())]; if (LookupResult) Reader.getContext().setPrimaryMergedDecl(LETDecl, LookupResult->getCanonicalDecl()); else LookupResult = LETDecl; } /// Attempts to merge the given declaration (D) with another declaration /// of the same entity, for the case where the entity is not actually /// redeclarable. This happens, for instance, when merging the fields of Loading