From: Jan Vorlicek Date: Mon, 25 May 2015 19:04:31 +0000 (+0200) Subject: Fix warning no-overloaded-virtual X-Git-Tag: accepted/tizen/base/20180629.140029~6659^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ac80fe431901358305bbc35f11247d1de2f7412f;p=platform%2Fupstream%2Fcoreclr.git Fix warning no-overloaded-virtual This warning is issued when a derived class defines a virtual method with the same name as its base class, but different set of parameters. The base class virtual method is hidden in that case. Clang issues a warning here. To fix the warning, I have added "using Base::Method" to the private section of all the derived classes. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index a9d42c0..f757063 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -279,9 +279,6 @@ add_compile_options(-Werror) # Disabled warnings add_compile_options(-Wno-unused-private-field) -# A derived class defines a virtual method with the same name as its base -# class, but different set of parameters. -add_compile_options(-Wno-overloaded-virtual) add_compile_options(-Wno-unused-variable) # Explicit constructor calls are not supported by clang (this->ClassName::ClassName()) add_compile_options(-Wno-microsoft) diff --git a/src/debug/daccess/dacdbiimpl.h b/src/debug/daccess/dacdbiimpl.h index ab9cab5..7da45e6 100644 --- a/src/debug/daccess/dacdbiimpl.h +++ b/src/debug/daccess/dacdbiimpl.h @@ -642,6 +642,9 @@ public: // CordbAssembly, CordbModule // ============================================================================ + using ClrDataAccess::GetModuleData; + using ClrDataAccess::GetAddressType; + public: // Get the full path and file name to the assembly's manifest module. BOOL GetAssemblyPath(VMPTR_Assembly vmAssembly, diff --git a/src/inc/metadata.h b/src/inc/metadata.h index d6dc0b7..c765ed5 100644 --- a/src/inc/metadata.h +++ b/src/inc/metadata.h @@ -1110,6 +1110,9 @@ EXTERN_GUID(IID_IMDInternalImportENC, 0xe03d7730, 0xd7e3, 0x11d2, 0x8c, 0xd, 0x0 #define INTERFACE IMDInternalImportENC DECLARE_INTERFACE_(IMDInternalImportENC, IMDInternalImport) { +private: + using IMDInternalImport::ApplyEditAndContinue; +public: // ENC only methods here. STDMETHOD(ApplyEditAndContinue)( // S_OK or error. MDInternalRW *pDelta) PURE; // Interface to MD with the ENC delta. diff --git a/src/inc/stgpool.h b/src/inc/stgpool.h index 153a5b7..5932a51 100644 --- a/src/inc/stgpool.h +++ b/src/inc/stgpool.h @@ -1094,6 +1094,10 @@ private: class StgBlobPool : public StgPool { friend class VerifyLayoutsMD; + + using StgPool::InitNew; + using StgPool::InitOnMem; + public: StgBlobPool(ULONG ulGrowInc=DFT_BLOB_HEAP_SIZE) : StgPool(ulGrowInc), diff --git a/src/md/compiler/regmeta.h b/src/md/compiler/regmeta.h index d2ca0fa..10642e4 100644 --- a/src/md/compiler/regmeta.h +++ b/src/md/compiler/regmeta.h @@ -109,6 +109,13 @@ struct CCustAttrHashKey class CCustAttrHash : public CClosedHashEx { typedef CCustAttrHashKey T; + + using CClosedHashEx::Hash; + using CClosedHashEx::Compare; + using CClosedHashEx::Status; + using CClosedHashEx::SetStatus; + using CClosedHashEx::GetKey; + public: CCustAttrHash(int iBuckets=37) : CClosedHashEx(iBuckets) {} unsigned int Hash(const T *pData); diff --git a/src/md/inc/recordpool.h b/src/md/inc/recordpool.h index 65d8700..15c5532 100644 --- a/src/md/inc/recordpool.h +++ b/src/md/inc/recordpool.h @@ -25,6 +25,10 @@ class RecordPool : public StgPool { friend class VerifyLayoutsMD; + + using StgPool::InitNew; + using StgPool::InitOnMem; + public: RecordPool() : StgPool(1024, 1)