r295828 - Fix -Wunused-private-field warning by removing unused ODRHash reference field from ODRDeclVisitor

Simon Pilgrim via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 22 05:19:25 PST 2017


Author: rksimon
Date: Wed Feb 22 07:19:24 2017
New Revision: 295828

URL: http://llvm.org/viewvc/llvm-project?rev=295828&view=rev
Log:
Fix -Wunused-private-field warning by removing unused ODRHash reference field from ODRDeclVisitor

Modified:
    cfe/trunk/lib/AST/ODRHash.cpp

Modified: cfe/trunk/lib/AST/ODRHash.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ODRHash.cpp?rev=295828&r1=295827&r2=295828&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ODRHash.cpp (original)
+++ cfe/trunk/lib/AST/ODRHash.cpp Wed Feb 22 07:19:24 2017
@@ -74,11 +74,10 @@ unsigned ODRHash::CalculateHash() {
 class ODRDeclVisitor : public ConstDeclVisitor<ODRDeclVisitor> {
   typedef ConstDeclVisitor<ODRDeclVisitor> Inherited;
   llvm::FoldingSetNodeID &ID;
-  ODRHash &Hash;
 
 public:
-  ODRDeclVisitor(llvm::FoldingSetNodeID &ID, ODRHash &Hash)
-      : ID(ID), Hash(Hash) {}
+  ODRDeclVisitor(llvm::FoldingSetNodeID &ID)
+      : ID(ID) {}
 
   void Visit(const Decl *D) {
     ID.AddInteger(D->getKind());
@@ -109,7 +108,7 @@ void ODRHash::AddSubDecl(const Decl *D)
   assert(D && "Expecting non-null pointer.");
   AddDecl(D);
 
-  ODRDeclVisitor(ID, *this).Visit(D);
+  ODRDeclVisitor(ID).Visit(D);
 }
 
 void ODRHash::AddCXXRecordDecl(const CXXRecordDecl *Record) {




More information about the cfe-commits mailing list