Index: cfe/trunk/include/clang/AST/ASTImporter.h =================================================================== --- cfe/trunk/include/clang/AST/ASTImporter.h +++ cfe/trunk/include/clang/AST/ASTImporter.h @@ -425,7 +425,7 @@ /// 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); Index: cfe/trunk/lib/AST/ExternalASTMerger.cpp =================================================================== --- cfe/trunk/lib/AST/ExternalASTMerger.cpp +++ cfe/trunk/lib/AST/ExternalASTMerger.cpp @@ -110,7 +110,7 @@ /// 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 @@ ToContainer->getPrimaryContext()->setMustBuildLookupTable(); assert(Parent.CanComplete(ToContainer)); } - return To; } ASTImporter &GetReverse() { return Reverse; } }; Index: lldb/trunk/include/lldb/Symbol/ClangASTImporter.h =================================================================== --- lldb/trunk/include/lldb/Symbol/ClangASTImporter.h +++ lldb/trunk/include/lldb/Symbol/ClangASTImporter.h @@ -262,7 +262,7 @@ void ImportDefinitionTo(clang::Decl *to, clang::Decl *from); - clang::Decl *Imported(clang::Decl *from, clang::Decl *to) override; + void Imported(clang::Decl *from, clang::Decl *to) override; clang::Decl *GetOriginalDecl(clang::Decl *To) override; Index: lldb/trunk/source/Symbol/ClangASTImporter.cpp =================================================================== --- lldb/trunk/source/Symbol/ClangASTImporter.cpp +++ lldb/trunk/source/Symbol/ClangASTImporter.cpp @@ -937,7 +937,7 @@ } } -clang::Decl *ClangASTImporter::Minion::Imported(clang::Decl *from, +void ClangASTImporter::Minion::Imported(clang::Decl *from, clang::Decl *to) { ClangASTMetrics::RegisterClangImport(); @@ -1096,8 +1096,6 @@ } } } - - return clang::ASTImporter::Imported(from, to); } clang::Decl *ClangASTImporter::Minion::GetOriginalDecl(clang::Decl *To) {