diff --git a/include/dxc/Test/CompilationResult.h b/include/dxc/Test/CompilationResult.h index 50f5e7c6b..dc79edc52 100644 --- a/include/dxc/Test/CompilationResult.h +++ b/include/dxc/Test/CompilationResult.h @@ -49,8 +49,7 @@ inline HRESULT GetFirstChildFromCursor(IDxcCursor *cursor, return hr; } -class TrivialDxcUnsavedFile : IDxcUnsavedFile -{ +class TrivialDxcUnsavedFile : IDxcUnsavedFile { private: volatile std::atomic m_dwRef; LPCSTR m_fileName; @@ -63,6 +62,8 @@ public: m_length = (unsigned)strlen(m_contents); } + virtual ~TrivialDxcUnsavedFile() {} + static HRESULT Create(LPCSTR fileName, LPCSTR contents, IDxcUnsavedFile** pResult) { CComPtr pNewValue = new TrivialDxcUnsavedFile(fileName, contents); diff --git a/lib/DxcSupport/WinFunctions.cpp b/lib/DxcSupport/WinFunctions.cpp index e85248043..c13effef1 100644 --- a/lib/DxcSupport/WinFunctions.cpp +++ b/lib/DxcSupport/WinFunctions.cpp @@ -157,6 +157,7 @@ unsigned char _BitScanForward(unsigned long * Index, unsigned long Mask) { struct CoMalloc : public IMalloc { CoMalloc() : m_dwRef(0) {}; + virtual ~CoMalloc(){}; DXC_MICROCOM_ADDREF_RELEASE_IMPL(m_dwRef) STDMETHODIMP QueryInterface(REFIID riid, void **ppvObject) override { diff --git a/lib/DxcSupport/dxcmem.cpp b/lib/DxcSupport/dxcmem.cpp index 72536e185..0cd648b95 100644 --- a/lib/DxcSupport/dxcmem.cpp +++ b/lib/DxcSupport/dxcmem.cpp @@ -43,7 +43,7 @@ HRESULT DxcInitThreadMalloc() throw() { void DxcCleanupThreadMalloc() throw() { if (g_ThreadMallocTls) { DXASSERT(g_pDefaultMalloc, "else DxcInitThreadMalloc didn't work/fail atomically"); - g_ThreadMallocTls->llvm::sys::ThreadLocal::~ThreadLocal(); + g_ThreadMallocTls->llvm::sys::ThreadLocal::~ThreadLocal(); g_pDefaultMalloc->Free(g_ThreadMallocTls); g_ThreadMallocTls = nullptr; } diff --git a/tools/clang/tools/dxclib/dxc.cpp b/tools/clang/tools/dxclib/dxc.cpp index 3f1be8b9a..b30a031a4 100644 --- a/tools/clang/tools/dxclib/dxc.cpp +++ b/tools/clang/tools/dxclib/dxc.cpp @@ -590,6 +590,7 @@ private: public: DXC_MICROCOM_ADDREF_RELEASE_IMPL(m_dwRef) DxcIncludeHandlerForInjectedSources() : m_dwRef(0) {}; + virtual ~DxcIncludeHandlerForInjectedSources(){}; std::unordered_map> includeFiles; HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, void **ppvObject) override { diff --git a/tools/clang/tools/libclang/dxcisenseimpl.cpp b/tools/clang/tools/libclang/dxcisenseimpl.cpp index d2f1bcdbb..1f4546733 100644 --- a/tools/clang/tools/libclang/dxcisenseimpl.cpp +++ b/tools/clang/tools/libclang/dxcisenseimpl.cpp @@ -51,8 +51,7 @@ HRESULT CreateDxcIntelliSense(_In_ REFIID riid, _Out_ LPVOID* ppv) throw() // This is exposed as a helper class, but the implementation works on // interfaces; we expect callers should be able to use their own. -class DxcBasicUnsavedFile : public IDxcUnsavedFile -{ +class DxcBasicUnsavedFile : public IDxcUnsavedFile { private: DXC_MICROCOM_TM_REF_FIELDS() LPSTR m_fileName; @@ -67,7 +66,7 @@ public: } DxcBasicUnsavedFile(IMalloc *pMalloc); - ~DxcBasicUnsavedFile(); + virtual ~DxcBasicUnsavedFile(); HRESULT Initialize(_In_z_ LPCSTR fileName, _In_z_ LPCSTR contents, unsigned length); static HRESULT Create(_In_z_ LPCSTR fileName, _In_z_ LPCSTR contents, unsigned length, _COM_Outptr_ IDxcUnsavedFile** pObject); diff --git a/tools/clang/unittests/HLSL/ExtensionTest.cpp b/tools/clang/unittests/HLSL/ExtensionTest.cpp index 6b4f84442..561aa22d1 100644 --- a/tools/clang/unittests/HLSL/ExtensionTest.cpp +++ b/tools/clang/unittests/HLSL/ExtensionTest.cpp @@ -303,6 +303,7 @@ public: m_tables.push_back(IntrinsicTable(L"Texture1D", std::begin(Texture1DIntrinsics), std::end(Texture1DIntrinsics))); m_tables.push_back(IntrinsicTable(L"Texture2D", std::begin(Texture2DIntrinsics), std::end(Texture2DIntrinsics))); } + virtual ~TestIntrinsicTable() {} DXC_MICROCOM_ADDREF_RELEASE_IMPL(m_dwRef) HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, void** ppvObject) override { return DoBasicQueryInterface(this, iid, ppvObject); @@ -403,6 +404,7 @@ public: , m_errorDefines(errorDefines) , m_warningDefines(warningDefines) { } + virtual ~TestSemanticDefineValidator() {} DXC_MICROCOM_ADDREF_RELEASE_IMPL(m_dwRef) HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, void** ppvObject) override {