From: Raphael Isemann Date: Wed, 20 Mar 2019 19:00:25 +0000 (+0000) Subject: Remove the unused return value in ASTImporter::Imported [NFC] X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1e1ffe52e64547dc5f23ac1d017f284d33142a52;p=clang Remove the unused return value in ASTImporter::Imported [NFC] Summary: `ASTImporter::Imported` currently returns a Decl, but that return value is not used by the ASTImporter (or anywhere else) nor is it documented. Reviewers: balazske, martong, a.sidorin, shafik Reviewed By: balazske, martong Subscribers: rnkovacs, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59595 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@356592 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/ASTImporter.h b/include/clang/AST/ASTImporter.h index 7e0ed57f28..8c73db0692 100644 --- a/include/clang/AST/ASTImporter.h +++ b/include/clang/AST/ASTImporter.h @@ -425,7 +425,7 @@ class TypeSourceInfo; /// Subclasses can override this function to observe all of the \c From -> /// \c To declaration mappings as they are imported. - virtual Decl *Imported(Decl *From, Decl *To) { return To; } + virtual void Imported(Decl *From, Decl *To) {} /// Store and assign the imported declaration to its counterpart. Decl *MapImported(Decl *From, Decl *To); diff --git a/lib/AST/ExternalASTMerger.cpp b/lib/AST/ExternalASTMerger.cpp index d7cbf4dfd9..29911caa36 100644 --- a/lib/AST/ExternalASTMerger.cpp +++ b/lib/AST/ExternalASTMerger.cpp @@ -110,7 +110,7 @@ public: /// Whenever a DeclContext is imported, ensure that ExternalASTSource's origin /// map is kept up to date. Also set the appropriate flags. - Decl *Imported(Decl *From, Decl *To) override { + void Imported(Decl *From, Decl *To) override { if (auto *ToDC = dyn_cast(To)) { const bool LoggingEnabled = Parent.LoggingEnabled(); if (LoggingEnabled) @@ -153,7 +153,6 @@ public: ToContainer->getPrimaryContext()->setMustBuildLookupTable(); assert(Parent.CanComplete(ToContainer)); } - return To; } ASTImporter &GetReverse() { return Reverse; } };