]> granicus.if.org Git - clang/commitdiff
Remove the unused return value in ASTImporter::Imported [NFC]
authorRaphael Isemann <teemperor@gmail.com>
Wed, 20 Mar 2019 19:00:25 +0000 (19:00 +0000)
committerRaphael Isemann <teemperor@gmail.com>
Wed, 20 Mar 2019 19:00:25 +0000 (19:00 +0000)
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

include/clang/AST/ASTImporter.h
lib/AST/ExternalASTMerger.cpp

index 7e0ed57f28e78421d651531ac96ba081a3f09d60..8c73db0692e834653e4e380227476fcb1e842283 100644 (file)
@@ -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);
index d7cbf4dfd95b27234e38b48009af3a89ce4bb010..29911caa36bd08eed8cc9cea75026d79cefa3791 100644 (file)
@@ -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<DeclContext>(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; }
 };