Ver código fonte

Change SAL __override to C++11 override (#1212)

Lei Zhang 7 anos atrás
pai
commit
c82edd6c5f
30 arquivos alterados com 655 adições e 656 exclusões
  1. 14 14
      include/dxc/HLSL/DxilSignatureAllocator.h
  2. 13 13
      include/dxc/HLSL/DxilSignatureElement.h
  3. 4 4
      include/dxc/HLSL/ViewIDPipelineValidation.inl
  4. 9 9
      include/dxc/Support/DxcLangExtensionsHelper.h
  5. 5 5
      include/dxc/Support/dxcapi.impl.h
  6. 40 40
      lib/DxcSupport/FileIOHelper.cpp
  7. 11 11
      lib/HLSL/DxcOptimizer.cpp
  8. 9 9
      lib/HLSL/DxilContainerAssembler.cpp
  9. 6 6
      lib/HLSL/DxilContainerReflection.cpp
  10. 1 1
      lib/HLSL/DxilModule.cpp
  11. 1 1
      lib/HLSL/DxilValidation.cpp
  12. 2 2
      lib/Support/Debug.cpp
  13. 2 2
      tools/clang/tools/dxc/dxc.cpp
  14. 2 2
      tools/clang/tools/dxcompiler/dxcassembler.cpp
  15. 304 304
      tools/clang/tools/dxcompiler/dxcdia.cpp
  16. 1 1
      tools/clang/tools/dxcompiler/dxcdisassembler.cpp
  17. 44 44
      tools/clang/tools/dxcompiler/dxcfilesystem.cpp
  18. 21 21
      tools/clang/tools/dxcompiler/dxclibrary.cpp
  19. 9 9
      tools/clang/tools/dxcompiler/dxclinker.cpp
  20. 12 12
      tools/clang/tools/dxcompiler/dxcompilerobj.cpp
  21. 4 4
      tools/clang/tools/dxcompiler/dxcontainerbuilder.cpp
  22. 4 4
      tools/clang/tools/dxcompiler/dxcvalidator.cpp
  23. 3 3
      tools/clang/tools/dxlib-sample/lib_share_preprocessor.cpp
  24. 3 3
      tools/clang/tools/libclang/dxcisenseimpl.cpp
  25. 85 85
      tools/clang/tools/libclang/dxcisenseimpl.h
  26. 11 11
      tools/clang/tools/libclang/dxcrewriteunused.cpp
  27. 4 4
      tools/clang/unittests/HLSL/CompilerTest.cpp
  28. 12 12
      tools/clang/unittests/HLSL/ExtensionTest.cpp
  29. 17 18
      tools/clang/unittests/HLSLHost/HLSLHost.cpp
  30. 2 2
      tools/clang/unittests/dxc_batch/dxc_batch.cpp

+ 14 - 14
include/dxc/HLSL/DxilSignatureAllocator.h

@@ -54,20 +54,20 @@ public:
       dataBitWidth(DXIL::SignatureDataWidth::Undefined),
       indexFlags(0)
     {}
-    __override ~DummyElement() {}
-    __override uint32_t GetID() const { return id; }
-    __override DXIL::SemanticKind GetKind() const { return kind; }
-    __override DXIL::InterpolationMode GetInterpolationMode() const { return interpolation; }
-    __override DXIL::SemanticInterpretationKind GetInterpretation() const { return interpretation; }
-    __override DXIL::SignatureDataWidth GetDataBitWidth() const { return dataBitWidth; }
-    __override uint32_t GetRows() const { return rows; }
-    __override uint32_t GetCols() const { return cols; }
-    __override bool IsAllocated() const { return row != (uint32_t)-1; }
-    __override uint32_t GetStartRow() const { return row; }
-    __override uint32_t GetStartCol() const { return col; }
-
-    __override void ClearLocation() { row = col = (uint32_t)-1; }
-    __override void SetLocation(uint32_t Row, uint32_t Col) { row = Row; col = Col; }
+    ~DummyElement() override {}
+    uint32_t GetID() const override { return id; }
+    DXIL::SemanticKind GetKind() const override { return kind; }
+    DXIL::InterpolationMode GetInterpolationMode() const override { return interpolation; }
+    DXIL::SemanticInterpretationKind GetInterpretation() const override { return interpretation; }
+    DXIL::SignatureDataWidth GetDataBitWidth() const override { return dataBitWidth; }
+    uint32_t GetRows() const override { return rows; }
+    uint32_t GetCols() const override { return cols; }
+    bool IsAllocated() const override { return row != (uint32_t)-1; }
+    uint32_t GetStartRow() const override { return row; }
+    uint32_t GetStartCol() const override { return col; }
+
+    void ClearLocation() override { row = col = (uint32_t)-1; }
+    void SetLocation(uint32_t Row, uint32_t Col) override { row = Row; col = Col; }
   };
 
   // index flags

+ 13 - 13
include/dxc/HLSL/DxilSignatureElement.h

@@ -114,12 +114,12 @@ class DxilPackElement : public DxilSignatureAllocator::PackElement {
 
 public:
   DxilPackElement(DxilSignatureElement *pSE, bool useMinPrecision) : m_pSE(pSE), m_bUseMinPrecision(useMinPrecision) {}
-  __override ~DxilPackElement() {}
-  __override uint32_t GetID() const { return m_pSE->GetID(); }
-  __override DXIL::SemanticKind GetKind() const { return m_pSE->GetKind(); }
-  __override DXIL::InterpolationMode GetInterpolationMode() const { return m_pSE->GetInterpolationMode()->GetKind(); }
-  __override DXIL::SemanticInterpretationKind GetInterpretation() const { return m_pSE->GetInterpretation(); }
-  __override DXIL::SignatureDataWidth GetDataBitWidth() const {
+  ~DxilPackElement() override {}
+  uint32_t GetID() const override { return m_pSE->GetID(); }
+  DXIL::SemanticKind GetKind() const override { return m_pSE->GetKind(); }
+  DXIL::InterpolationMode GetInterpolationMode() const override { return m_pSE->GetInterpolationMode()->GetKind(); }
+  DXIL::SemanticInterpretationKind GetInterpretation() const override { return m_pSE->GetInterpretation(); }
+  DXIL::SignatureDataWidth GetDataBitWidth() const override {
     uint8_t size = m_pSE->GetCompType().GetSizeInBits();
     // bool, min precision, or 32 bit types map to 32 bit size.
     if (size == 16) {
@@ -130,17 +130,17 @@ public:
     }
     return DXIL::SignatureDataWidth::Undefined;
   }
-  __override uint32_t GetRows() const { return m_pSE->GetRows(); }
-  __override uint32_t GetCols() const { return m_pSE->GetCols(); }
-  __override bool IsAllocated() const { return m_pSE->IsAllocated(); }
-  __override uint32_t GetStartRow() const { return m_pSE->GetStartRow(); }
-  __override uint32_t GetStartCol() const { return m_pSE->GetStartCol(); }
+  uint32_t GetRows() const override { return m_pSE->GetRows(); }
+  uint32_t GetCols() const override { return m_pSE->GetCols(); }
+  bool IsAllocated() const override { return m_pSE->IsAllocated(); }
+  uint32_t GetStartRow() const override { return m_pSE->GetStartRow(); }
+  uint32_t GetStartCol() const override { return m_pSE->GetStartCol(); }
 
-  __override void ClearLocation() {
+  void ClearLocation() override {
     m_pSE->SetStartRow(-1);
     m_pSE->SetStartCol(-1);
   }
-  __override void SetLocation(uint32_t Row, uint32_t Col) {
+  void SetLocation(uint32_t Row, uint32_t Col) override {
     m_pSE->SetStartRow(Row);
     m_pSE->SetStartCol(Col);
   }

+ 4 - 4
include/dxc/HLSL/ViewIDPipelineValidation.inl

@@ -238,10 +238,10 @@ public:
       m_GSRastStreamIndex(gsRastStreamIndex)
   {}
   virtual ~ViewIDValidator_impl() {}
-  __override Result ValidateStage(const DxilPipelineStateValidation &PSV,
-                                  bool bFinalStage,
-                                  bool bExpandInputOnly,
-                                  unsigned &mismatchElementId) {
+  Result ValidateStage(const DxilPipelineStateValidation &PSV,
+                       bool bFinalStage,
+                       bool bExpandInputOnly,
+                       unsigned &mismatchElementId) override {
     if (!PSV.GetPSVRuntimeInfo0())
       return Result::InvalidPSV;
     if (!PSV.GetPSVRuntimeInfo1())

+ 9 - 9
include/dxc/Support/DxcLangExtensionsHelper.h

@@ -192,7 +192,7 @@ public:
     return SemanticDefineValidationResult{ warning, error };
   }
 
-  __override void SetupSema(clang::Sema &S) {
+  void SetupSema(clang::Sema &S) override {
     clang::ExternalASTSource *astSource = S.getASTContext().getExternalSource();
     if (clang::ExternalSemaSource *externalSema =
             llvm::dyn_cast_or_null<clang::ExternalSemaSource>(astSource)) {
@@ -202,13 +202,13 @@ public:
     }
   }
 
-  __override void SetupPreprocessorOptions(clang::PreprocessorOptions &PPOpts) {
+  void SetupPreprocessorOptions(clang::PreprocessorOptions &PPOpts) override {
     for (const auto & define : m_defines) {
       PPOpts.addMacroDef(llvm::StringRef(define.c_str()));
     }
   }
 
-  __override DxcLangExtensionsHelper *GetDxcLangExtensionsHelper() {
+  DxcLangExtensionsHelper *GetDxcLangExtensionsHelper() override {
     return this;
   }
  
@@ -220,27 +220,27 @@ public:
 // Use this macro to embed an implementation that will delegate to a field.
 // Note that QueryInterface still needs to return the vtable.
 #define DXC_LANGEXTENSIONS_HELPER_IMPL(_helper_field_) \
-  __override HRESULT STDMETHODCALLTYPE RegisterIntrinsicTable(_In_ IDxcIntrinsicTable *pTable) { \
+  HRESULT STDMETHODCALLTYPE RegisterIntrinsicTable(_In_ IDxcIntrinsicTable *pTable) override { \
     DxcThreadMalloc TM(m_pMalloc); \
     return (_helper_field_).RegisterIntrinsicTable(pTable); \
   } \
-  __override HRESULT STDMETHODCALLTYPE RegisterSemanticDefine(LPCWSTR name) { \
+  HRESULT STDMETHODCALLTYPE RegisterSemanticDefine(LPCWSTR name) override { \
     DxcThreadMalloc TM(m_pMalloc); \
     return (_helper_field_).RegisterSemanticDefine(name); \
   } \
-  __override HRESULT STDMETHODCALLTYPE RegisterSemanticDefineExclusion(LPCWSTR name) { \
+  HRESULT STDMETHODCALLTYPE RegisterSemanticDefineExclusion(LPCWSTR name) override { \
     DxcThreadMalloc TM(m_pMalloc); \
     return (_helper_field_).RegisterSemanticDefineExclusion(name); \
   } \
-  __override HRESULT STDMETHODCALLTYPE RegisterDefine(LPCWSTR name) { \
+  HRESULT STDMETHODCALLTYPE RegisterDefine(LPCWSTR name) override { \
     DxcThreadMalloc TM(m_pMalloc); \
     return (_helper_field_).RegisterDefine(name); \
   } \
-  __override HRESULT STDMETHODCALLTYPE SetSemanticDefineValidator(_In_ IDxcSemanticDefineValidator* pValidator) { \
+  HRESULT STDMETHODCALLTYPE SetSemanticDefineValidator(_In_ IDxcSemanticDefineValidator* pValidator) override { \
     DxcThreadMalloc TM(m_pMalloc); \
     return (_helper_field_).SetSemanticDefineValidator(pValidator); \
   } \
-  __override HRESULT STDMETHODCALLTYPE SetSemanticDefineMetaDataName(LPCSTR name) { \
+  HRESULT STDMETHODCALLTYPE SetSemanticDefineMetaDataName(LPCSTR name) override { \
     DxcThreadMalloc TM(m_pMalloc); \
     return (_helper_field_).SetSemanticDefineMetaDataName(name); \
   } \

+ 5 - 5
include/dxc/Support/dxcapi.impl.h

@@ -97,7 +97,7 @@ public:
     return CreateFromResultErrorStatus(resultBlob, errorBlob, status, pResult);
   }
 
-  __override HRESULT STDMETHODCALLTYPE GetStatus(_Out_ HRESULT *pStatus) {
+  HRESULT STDMETHODCALLTYPE GetStatus(_Out_ HRESULT *pStatus) override {
     if (pStatus == nullptr)
       return E_INVALIDARG;
 
@@ -105,13 +105,13 @@ public:
     return S_OK;
   }
 
-  __override HRESULT STDMETHODCALLTYPE
-    GetResult(_COM_Outptr_result_maybenull_ IDxcBlob **ppResult) {
+  HRESULT STDMETHODCALLTYPE
+    GetResult(_COM_Outptr_result_maybenull_ IDxcBlob **ppResult) override {
     return m_result.CopyTo(ppResult);
   }
 
-  __override HRESULT STDMETHODCALLTYPE
-    GetErrorBuffer(_COM_Outptr_result_maybenull_ IDxcBlobEncoding **ppErrors) {
+  HRESULT STDMETHODCALLTYPE
+    GetErrorBuffer(_COM_Outptr_result_maybenull_ IDxcBlobEncoding **ppErrors) override {
     return m_errors.CopyTo(ppErrors);
   }
 };

+ 40 - 40
lib/DxcSupport/FileIOHelper.cpp

@@ -815,22 +815,22 @@ public:
   }
 
   // AbstractMemoryStream implementation.
-  __override LPBYTE GetPtr() {
+  LPBYTE GetPtr() override {
     return m_pMemory;
   }
 
-  __override ULONG GetPtrSize() {
+  ULONG GetPtrSize() override {
     return m_size;
   }
 
-  __override LPBYTE Detach() {
+  LPBYTE Detach() override {
     LPBYTE result = m_pMemory;
     m_pMemory = nullptr;
     Reset();
     return result;
   }
 
-  __override HRESULT Reserve(ULONG targetSize) {
+  HRESULT Reserve(ULONG targetSize) override {
     if (m_pMemory == nullptr) {
       m_pMemory = (LPBYTE)m_pMalloc->Alloc(targetSize);
       if (m_pMemory == nullptr) {
@@ -851,18 +851,18 @@ public:
   }
 
   // IDxcBlob implementation. Requires no further writes.
-  __override LPVOID STDMETHODCALLTYPE GetBufferPointer(void) {
+  LPVOID STDMETHODCALLTYPE GetBufferPointer(void) override {
     return m_pMemory;
   }
-  __override SIZE_T STDMETHODCALLTYPE GetBufferSize(void) {
+  SIZE_T STDMETHODCALLTYPE GetBufferSize(void) override {
     return m_size;
   }
-  __override UINT64 GetPosition() {
+  UINT64 GetPosition() override {
     return m_offset;
   }
 
   // ISequentialStream implementation.
-  __override HRESULT STDMETHODCALLTYPE Read(void* pv, ULONG cb, ULONG* pcbRead) {
+  HRESULT STDMETHODCALLTYPE Read(void* pv, ULONG cb, ULONG* pcbRead) override {
     if (!pv || !pcbRead) return E_POINTER;
     // If we seeked past the end, read nothing.
     if (m_offset > m_size) {
@@ -876,7 +876,7 @@ public:
     return (*pcbRead == cb) ? S_OK : S_FALSE;
   }
 
-  __override HRESULT STDMETHODCALLTYPE Write(void const* pv, ULONG cb, ULONG* pcbWritten) {
+  HRESULT STDMETHODCALLTYPE Write(void const* pv, ULONG cb, ULONG* pcbWritten) override {
     if (!pv || !pcbWritten) return E_POINTER;
     if (cb + m_offset > m_allocSize) {
       HRESULT hr = Grow(cb + m_offset);
@@ -894,7 +894,7 @@ public:
   }
 
   // IStream implementation.
-  __override HRESULT STDMETHODCALLTYPE SetSize(ULARGE_INTEGER val) {
+  HRESULT STDMETHODCALLTYPE SetSize(ULARGE_INTEGER val) override {
     if (val.HighPart != 0) {
       return E_OUTOFMEMORY;
     }
@@ -912,31 +912,31 @@ public:
     return S_OK;
   }
 
-  __override HRESULT STDMETHODCALLTYPE CopyTo(IStream *, ULARGE_INTEGER,
+  HRESULT STDMETHODCALLTYPE CopyTo(IStream *, ULARGE_INTEGER,
     ULARGE_INTEGER *,
-    ULARGE_INTEGER *) {
+    ULARGE_INTEGER *) override {
     return E_NOTIMPL;
   }
 
-  __override HRESULT STDMETHODCALLTYPE Commit(DWORD) { return E_NOTIMPL; }
+  HRESULT STDMETHODCALLTYPE Commit(DWORD) override { return E_NOTIMPL; }
 
-  __override HRESULT STDMETHODCALLTYPE Revert(void) { return E_NOTIMPL; }
+  HRESULT STDMETHODCALLTYPE Revert(void) override { return E_NOTIMPL; }
 
-  __override HRESULT STDMETHODCALLTYPE LockRegion(ULARGE_INTEGER,
-    ULARGE_INTEGER, DWORD) {
+  HRESULT STDMETHODCALLTYPE LockRegion(ULARGE_INTEGER,
+    ULARGE_INTEGER, DWORD) override {
     return E_NOTIMPL;
   }
 
-  __override HRESULT STDMETHODCALLTYPE UnlockRegion(ULARGE_INTEGER,
-    ULARGE_INTEGER, DWORD) {
+  HRESULT STDMETHODCALLTYPE UnlockRegion(ULARGE_INTEGER,
+    ULARGE_INTEGER, DWORD) override {
     return E_NOTIMPL;
   }
 
-  __override HRESULT STDMETHODCALLTYPE Clone(IStream **) { return E_NOTIMPL; }
+  HRESULT STDMETHODCALLTYPE Clone(IStream **) override { return E_NOTIMPL; }
 
-  __override HRESULT STDMETHODCALLTYPE Seek(LARGE_INTEGER liDistanceToMove,
+  HRESULT STDMETHODCALLTYPE Seek(LARGE_INTEGER liDistanceToMove,
     DWORD dwOrigin,
-    ULARGE_INTEGER *lpNewFilePointer) {
+    ULARGE_INTEGER *lpNewFilePointer) override {
     if (lpNewFilePointer != nullptr) {
       lpNewFilePointer->QuadPart = 0;
     }
@@ -968,8 +968,8 @@ public:
     return S_OK;
   }
 
-  __override HRESULT STDMETHODCALLTYPE Stat(STATSTG *pStatstg,
-    DWORD grfStatFlag) {
+  HRESULT STDMETHODCALLTYPE Stat(STATSTG *pStatstg,
+    DWORD grfStatFlag) override {
     if (pStatstg == nullptr) {
       return E_POINTER;
     }
@@ -1003,8 +1003,8 @@ public:
   }
 
   // ISequentialStream implementation.
-  __override HRESULT STDMETHODCALLTYPE Read(void *pv, ULONG cb,
-    ULONG *pcbRead) {
+  HRESULT STDMETHODCALLTYPE Read(void *pv, ULONG cb,
+    ULONG *pcbRead) override {
     if (!pv || !pcbRead)
       return E_POINTER;
     ULONG cbLeft = m_size - m_offset;
@@ -1014,40 +1014,40 @@ public:
     return (*pcbRead == cb) ? S_OK : S_FALSE;
   }
 
-  __override HRESULT STDMETHODCALLTYPE Write(void const *, ULONG, ULONG *) {
+  HRESULT STDMETHODCALLTYPE Write(void const *, ULONG, ULONG *) override {
     return STG_E_ACCESSDENIED;
   }
 
   // IStream implementation.
-  __override HRESULT STDMETHODCALLTYPE SetSize(ULARGE_INTEGER val) {
+  HRESULT STDMETHODCALLTYPE SetSize(ULARGE_INTEGER val) override {
     return STG_E_ACCESSDENIED;
   }
 
-  __override HRESULT STDMETHODCALLTYPE CopyTo(IStream *, ULARGE_INTEGER,
+  HRESULT STDMETHODCALLTYPE CopyTo(IStream *, ULARGE_INTEGER,
     ULARGE_INTEGER *,
-    ULARGE_INTEGER *) {
+    ULARGE_INTEGER *) override {
     return E_NOTIMPL;
   }
 
-  __override HRESULT STDMETHODCALLTYPE Commit(DWORD) { return E_NOTIMPL; }
+  HRESULT STDMETHODCALLTYPE Commit(DWORD) override { return E_NOTIMPL; }
 
-  __override HRESULT STDMETHODCALLTYPE Revert(void) { return E_NOTIMPL; }
+  HRESULT STDMETHODCALLTYPE Revert(void) override { return E_NOTIMPL; }
 
-  __override HRESULT STDMETHODCALLTYPE LockRegion(ULARGE_INTEGER,
-    ULARGE_INTEGER, DWORD) {
+  HRESULT STDMETHODCALLTYPE LockRegion(ULARGE_INTEGER,
+    ULARGE_INTEGER, DWORD) override {
     return E_NOTIMPL;
   }
 
-  __override HRESULT STDMETHODCALLTYPE UnlockRegion(ULARGE_INTEGER,
-    ULARGE_INTEGER, DWORD) {
+  HRESULT STDMETHODCALLTYPE UnlockRegion(ULARGE_INTEGER,
+    ULARGE_INTEGER, DWORD) override {
     return E_NOTIMPL;
   }
 
-  __override HRESULT STDMETHODCALLTYPE Clone(IStream **) { return E_NOTIMPL; }
+  HRESULT STDMETHODCALLTYPE Clone(IStream **) override { return E_NOTIMPL; }
 
-  __override HRESULT STDMETHODCALLTYPE Seek(LARGE_INTEGER liDistanceToMove,
+  HRESULT STDMETHODCALLTYPE Seek(LARGE_INTEGER liDistanceToMove,
     DWORD dwOrigin,
-    ULARGE_INTEGER *lpNewFilePointer) {
+    ULARGE_INTEGER *lpNewFilePointer) override {
     if (lpNewFilePointer != nullptr) {
       lpNewFilePointer->QuadPart = 0;
     }
@@ -1084,8 +1084,8 @@ public:
     return S_OK;
   }
 
-  __override HRESULT STDMETHODCALLTYPE Stat(STATSTG *pStatstg,
-    DWORD grfStatFlag) {
+  HRESULT STDMETHODCALLTYPE Stat(STATSTG *pStatstg,
+    DWORD grfStatFlag) override {
     if (pStatstg == nullptr) {
       return E_POINTER;
     }

+ 11 - 11
lib/HLSL/DxcOptimizer.cpp

@@ -455,25 +455,25 @@ public:
     return S_OK;
   }
 
-  __override HRESULT STDMETHODCALLTYPE GetOptionName(_COM_Outptr_ LPWSTR *ppResult) {
+  HRESULT STDMETHODCALLTYPE GetOptionName(_COM_Outptr_ LPWSTR *ppResult) override {
     return Utf8ToUtf16CoTaskMalloc(m_pOptionName, ppResult);
   }
-  __override HRESULT STDMETHODCALLTYPE GetDescription(_COM_Outptr_ LPWSTR *ppResult) {
+  HRESULT STDMETHODCALLTYPE GetDescription(_COM_Outptr_ LPWSTR *ppResult) override {
     return Utf8ToUtf16CoTaskMalloc(m_pDescription, ppResult);
   }
 
-  __override HRESULT STDMETHODCALLTYPE GetOptionArgCount(_Out_ UINT32 *pCount) {
+  HRESULT STDMETHODCALLTYPE GetOptionArgCount(_Out_ UINT32 *pCount) override {
     if (!pCount) return E_INVALIDARG;
     *pCount = m_pArgDescriptions.size();
     return S_OK;
   }
 
-  __override HRESULT STDMETHODCALLTYPE GetOptionArgName(UINT32 argIndex, LPWSTR *ppResult) {
+  HRESULT STDMETHODCALLTYPE GetOptionArgName(UINT32 argIndex, LPWSTR *ppResult) override {
     if (!ppResult) return E_INVALIDARG;
     if (argIndex >= m_pArgNames.size()) return E_INVALIDARG;
     return Utf8ToUtf16CoTaskMalloc(m_pArgNames[argIndex], ppResult);
   }
-  __override HRESULT STDMETHODCALLTYPE GetOptionArgDescription(UINT32 argIndex, LPWSTR *ppResult) {
+  HRESULT STDMETHODCALLTYPE GetOptionArgDescription(UINT32 argIndex, LPWSTR *ppResult) override {
     if (!ppResult) return E_INVALIDARG;
     if (argIndex >= m_pArgDescriptions.size()) return E_INVALIDARG;
     return Utf8ToUtf16CoTaskMalloc(m_pArgDescriptions[argIndex], ppResult);
@@ -496,14 +496,14 @@ public:
   HRESULT Initialize();
   const PassInfo *getPassByID(llvm::AnalysisID PassID);
   const PassInfo *getPassByName(const char *pName);
-  __override HRESULT STDMETHODCALLTYPE GetAvailablePassCount(_Out_ UINT32 *pCount) {
+  HRESULT STDMETHODCALLTYPE GetAvailablePassCount(_Out_ UINT32 *pCount) override {
     return AssignToOut<UINT32>(m_passes.size(), pCount);
   }
-  __override HRESULT STDMETHODCALLTYPE GetAvailablePass(UINT32 index, _COM_Outptr_ IDxcOptimizerPass** ppResult);
-  __override HRESULT STDMETHODCALLTYPE RunOptimizer(IDxcBlob *pBlob,
+  HRESULT STDMETHODCALLTYPE GetAvailablePass(UINT32 index, _COM_Outptr_ IDxcOptimizerPass** ppResult) override;
+  HRESULT STDMETHODCALLTYPE RunOptimizer(IDxcBlob *pBlob,
     _In_count_(optionCount) LPCWSTR *ppOptions, UINT32 optionCount,
     _COM_Outptr_ IDxcBlob **ppOutputModule,
-    _COM_Outptr_opt_ IDxcBlobEncoding **ppOutputText);
+    _COM_Outptr_opt_ IDxcBlobEncoding **ppOutputText) override;
 };
 
 class CapturePassManager : public llvm::legacy::PassManagerBase {
@@ -514,7 +514,7 @@ public:
     for (auto P : Passes) delete P;
   }
 
-  __override void add(Pass *P) {
+  void add(Pass *P) override {
     Passes.push_back(P);
   }
 
@@ -533,7 +533,7 @@ HRESULT DxcOptimizer::Initialize() {
 
     struct PRL : public PassRegistrationListener {
       std::vector<const PassInfo *> *Passes;
-      __override void passEnumerate(const PassInfo * PI) {
+      void passEnumerate(const PassInfo * PI) override {
         DXASSERT(nullptr != PI->getNormalCtor(), "else cannot construct");
         Passes->push_back(PI);
       }

+ 9 - 9
lib/HLSL/DxilContainerAssembler.cpp

@@ -236,11 +236,11 @@ public:
     calcSizes();
   }
 
-  __override uint32_t size() const {
+  uint32_t size() const override {
     return m_lastOffset;
   }
 
-  __override void write(AbstractMemoryStream *pStream) {
+  void write(AbstractMemoryStream *pStream) override {
     UINT64 startPos = pStream->GetPosition();
     const std::vector<std::unique_ptr<hlsl::DxilSignatureElement>> &elements = m_signature.GetElements();
 
@@ -326,10 +326,10 @@ public:
   DxilFeatureInfoWriter(const DxilModule &M) {
     featureInfo.FeatureFlags = M.m_ShaderFlags.GetFeatureInfo();
   }
-  __override uint32_t size() const {
+  uint32_t size() const override {
     return sizeof(DxilShaderFeatureInfo);
   }
-  __override void write(AbstractMemoryStream *pStream) {
+  void write(AbstractMemoryStream *pStream) override {
     IFT(WriteStreamValue(pStream, featureInfo.FeatureFlags));
   }
 };
@@ -481,11 +481,11 @@ public:
       DXASSERT(false, "PSV InitNew failed computing size!");
     }
   }
-  __override uint32_t size() const {
+  uint32_t size() const override {
     return m_PSVBufferSize;
   }
 
-  __override void write(AbstractMemoryStream *pStream) {
+  void write(AbstractMemoryStream *pStream) override {
     m_PSVBuffer.resize(m_PSVBufferSize);
     if (!m_PSV.InitNew(m_PSVInitInfo, m_PSVBuffer.data(), &m_PSVBufferSize)) {
       DXASSERT(false, "PSV InitNew failed!");
@@ -714,11 +714,11 @@ private:
   llvm::SmallVector<DxilPart, 8> m_Parts;
 
 public:
-  __override void AddPart(uint32_t FourCC, uint32_t Size, WriteFn Write) {
+  void AddPart(uint32_t FourCC, uint32_t Size, WriteFn Write) override {
     m_Parts.emplace_back(FourCC, Size, Write);
   }
 
-  __override uint32_t size() const {
+  uint32_t size() const override {
     uint32_t partSize = 0;
     for (auto &part : m_Parts) {
       partSize += part.Header.PartSize;
@@ -726,7 +726,7 @@ public:
     return (uint32_t)GetDxilContainerSizeFromParts((uint32_t)m_Parts.size(), partSize);
   }
 
-  __override void write(AbstractMemoryStream *pStream) {
+  void write(AbstractMemoryStream *pStream) override {
     DxilContainerHeader header;
     const uint32_t PartCount = (uint32_t)m_Parts.size();
     uint32_t containerSizeInBytes = size();

+ 6 - 6
lib/HLSL/DxilContainerReflection.cpp

@@ -58,12 +58,12 @@ public:
     return DoBasicQueryInterface<IDxcContainerReflection>(this, iid, ppvObject);
   }
 
-  __override HRESULT STDMETHODCALLTYPE Load(_In_ IDxcBlob *pContainer);
-  __override HRESULT STDMETHODCALLTYPE GetPartCount(_Out_ UINT32 *pResult);
-  __override HRESULT STDMETHODCALLTYPE GetPartKind(UINT32 idx, _Out_ UINT32 *pResult);
-  __override HRESULT STDMETHODCALLTYPE GetPartContent(UINT32 idx, _COM_Outptr_ IDxcBlob **ppResult);
-  __override HRESULT STDMETHODCALLTYPE FindFirstPartKind(UINT32 kind, _Out_ UINT32 *pResult);
-  __override HRESULT STDMETHODCALLTYPE GetPartReflection(UINT32 idx, REFIID iid, _COM_Outptr_ void **ppvObject);
+  HRESULT STDMETHODCALLTYPE Load(_In_ IDxcBlob *pContainer) override;
+  HRESULT STDMETHODCALLTYPE GetPartCount(_Out_ UINT32 *pResult) override;
+  HRESULT STDMETHODCALLTYPE GetPartKind(UINT32 idx, _Out_ UINT32 *pResult) override;
+  HRESULT STDMETHODCALLTYPE GetPartContent(UINT32 idx, _COM_Outptr_ IDxcBlob **ppResult) override;
+  HRESULT STDMETHODCALLTYPE FindFirstPartKind(UINT32 kind, _Out_ UINT32 *pResult) override;
+  HRESULT STDMETHODCALLTYPE GetPartReflection(UINT32 idx, REFIID iid, _COM_Outptr_ void **ppvObject) override;
 };
 
 class CShaderReflectionConstantBuffer;

+ 1 - 1
lib/HLSL/DxilModule.cpp

@@ -44,7 +44,7 @@ public:
     : DiagnosticInfo(DK_FirstPluginKind, DiagnosticSeverity::DS_Error),
     m_message(str) { }
 
-  __override void print(DiagnosticPrinter &DP) const {
+  void print(DiagnosticPrinter &DP) const override {
     DP << m_message;
   }
 };

+ 1 - 1
lib/HLSL/DxilValidation.cpp

@@ -282,7 +282,7 @@ public:
     : DiagnosticInfo(DK_FirstPluginKind, DiagnosticSeverity::DS_Error),
     m_message(str) { }
 
-  __override void print(DiagnosticPrinter &DP) const {
+  void print(DiagnosticPrinter &DP) const override {
     DP << m_message;
   }
 };

+ 2 - 2
lib/Support/Debug.cpp

@@ -80,8 +80,8 @@ namespace llvm {
       ods_ostream() {
         SetUnbuffered();
       }
-      __override uint64_t current_pos() const { return 0; }
-      __override void write_impl(const char *Ptr, size_t Size) {
+      uint64_t current_pos() const override { return 0; }
+      void write_impl(const char *Ptr, size_t Size) override {
         // Need a null-terminated string here.
         char chunk[512];
         while (Size > 0) {

+ 2 - 2
tools/clang/tools/dxc/dxc.cpp

@@ -581,10 +581,10 @@ public:
     return S_OK;
   }
 
-  __override HRESULT STDMETHODCALLTYPE LoadSource(
+  HRESULT STDMETHODCALLTYPE LoadSource(
     _In_ LPCWSTR pFilename,
     _COM_Outptr_result_maybenull_ IDxcBlob **ppIncludeSource
-  ) {
+  ) override {
     try {
       *ppIncludeSource = includeFiles.at(std::wstring(pFilename));
       (*ppIncludeSource)->AddRef();

+ 2 - 2
tools/clang/tools/dxcompiler/dxcassembler.cpp

@@ -44,10 +44,10 @@ public:
   }
 
   // Assemble dxil in ll or llvm bitcode to dxbc container.
-  __override HRESULT STDMETHODCALLTYPE AssembleToContainer(
+  HRESULT STDMETHODCALLTYPE AssembleToContainer(
       _In_ IDxcBlob *pShader, // Shader to assemble.
       _COM_Outptr_ IDxcOperationResult **ppResult // Assemble output status, buffer, and errors
-      );
+      ) override;
 };
 
 // Assemble dxil in ll or llvm bitcode to dxbc container.

Diferenças do arquivo suprimidas por serem muito extensas
+ 304 - 304
tools/clang/tools/dxcompiler/dxcdia.cpp


+ 1 - 1
tools/clang/tools/dxcompiler/dxcdisassembler.cpp

@@ -973,7 +973,7 @@ static const char *OpCodeSignatures[] = {
 class DxcAssemblyAnnotationWriter : public llvm::AssemblyAnnotationWriter {
 public:
   ~DxcAssemblyAnnotationWriter() {}
-  __override void printInfoComment(const Value &V, formatted_raw_ostream &OS) {
+  void printInfoComment(const Value &V, formatted_raw_ostream &OS) override {
     const CallInst *CI = dyn_cast<const CallInst>(&V);
     if (!CI) {
       return;

+ 44 - 44
tools/clang/tools/dxcompiler/dxcfilesystem.cpp

@@ -385,31 +385,31 @@ public:
     return S_OK;
   }
 
-  __override ~DxcArgsFileSystemImpl() { };
-  __override BOOL FindNextFileW(
+  ~DxcArgsFileSystemImpl() override { };
+  BOOL FindNextFileW(
     _In_   HANDLE hFindFile,
-    _Out_  LPWIN32_FIND_DATAW lpFindFileData) throw() {
+    _Out_  LPWIN32_FIND_DATAW lpFindFileData) throw() override {
     SetLastError(ERROR_NOT_CAPABLE);
     return FALSE;
   }
 
-  __override HANDLE FindFirstFileW(
+  HANDLE FindFirstFileW(
     _In_   LPCWSTR lpFileName,
-    _Out_  LPWIN32_FIND_DATAW lpFindFileData) throw() {
+    _Out_  LPWIN32_FIND_DATAW lpFindFileData) throw() override {
     SetLastError(ERROR_NOT_CAPABLE);
     return FALSE;
   }
 
-  __override void FindClose(HANDLE findHandle) throw() {
+  void FindClose(HANDLE findHandle) throw() override {
     __debugbreak();
   }
 
-  __override HANDLE CreateFileW(
+  HANDLE CreateFileW(
     _In_      LPCWSTR lpFileName,
     _In_      DWORD dwDesiredAccess,
     _In_      DWORD dwShareMode,
     _In_      DWORD dwCreationDisposition,
-    _In_      DWORD dwFlagsAndAttributes) throw() {
+    _In_      DWORD dwFlagsAndAttributes) throw() override {
     DXTRACE_FMT_APIFS("DxcArgsFileSystem::CreateFileW %S\n", lpFileName);
     DWORD findError;
     {
@@ -438,15 +438,15 @@ public:
     return INVALID_HANDLE_VALUE;
   }
 
-  __override BOOL SetFileTime(_In_ HANDLE hFile,
+  BOOL SetFileTime(_In_ HANDLE hFile,
     _In_opt_  const FILETIME *lpCreationTime,
     _In_opt_  const FILETIME *lpLastAccessTime,
-    _In_opt_  const FILETIME *lpLastWriteTime) throw() {
+    _In_opt_  const FILETIME *lpLastWriteTime) throw() override {
     SetLastError(ERROR_NOT_CAPABLE);
     return FALSE;
   }
 
-  __override BOOL GetFileInformationByHandle(_In_ HANDLE hFile, _Out_ LPBY_HANDLE_FILE_INFORMATION lpFileInformation) throw() {
+  BOOL GetFileInformationByHandle(_In_ HANDLE hFile, _Out_ LPBY_HANDLE_FILE_INFORMATION lpFileInformation) throw() override {
     DxcArgsHandle argsHandle(hFile);
     ZeroMemory(lpFileInformation, sizeof(*lpFileInformation));
     lpFileInformation->nFileIndexLow = (DWORD)(uintptr_t)hFile;
@@ -477,7 +477,7 @@ public:
     return FALSE;
   }
 
-  __override DWORD GetFileType(_In_ HANDLE hFile) throw() {
+  DWORD GetFileType(_In_ HANDLE hFile) throw() override {
     DxcArgsHandle argsHandle(hFile);
     if (argsHandle.IsStdHandle()) {
       return FILE_TYPE_CHAR;
@@ -491,15 +491,15 @@ public:
     return FILE_TYPE_UNKNOWN;
   }
 
-  __override BOOL CreateHardLinkW(_In_ LPCWSTR lpFileName, _In_ LPCWSTR lpExistingFileName) throw() {
+  BOOL CreateHardLinkW(_In_ LPCWSTR lpFileName, _In_ LPCWSTR lpExistingFileName) throw() override {
     SetLastError(ERROR_NOT_CAPABLE);
     return FALSE;
   }
-  __override BOOL MoveFileExW(_In_ LPCWSTR lpExistingFileName, _In_opt_ LPCWSTR lpNewFileName, _In_ DWORD dwFlags) throw() {
+  BOOL MoveFileExW(_In_ LPCWSTR lpExistingFileName, _In_opt_ LPCWSTR lpNewFileName, _In_ DWORD dwFlags) throw() override {
     SetLastError(ERROR_NOT_CAPABLE);
     return FALSE;
   }
-  __override DWORD GetFileAttributesW(_In_ LPCWSTR lpFileName) throw() {
+  DWORD GetFileAttributesW(_In_ LPCWSTR lpFileName) throw() override {
     DXTRACE_FMT_APIFS("DxcArgsFileSystem::GetFileAttributesW %S\n", lpFileName);
     DWORD findError;
     {
@@ -536,7 +536,7 @@ public:
     return INVALID_FILE_ATTRIBUTES;
   }
 
-  __override BOOL CloseHandle(_In_ HANDLE hObject) throw() {
+  BOOL CloseHandle(_In_ HANDLE hObject) throw() override {
     // Not actually closing handle. Would allow improper usage, but simplifies
     // query/open/usage patterns.
     if (IsKnownHandle(hObject)) {
@@ -546,79 +546,79 @@ public:
     SetLastError(ERROR_INVALID_HANDLE);
     return FALSE;
   }
-  __override BOOL DeleteFileW(_In_ LPCWSTR lpFileName) throw() {
+  BOOL DeleteFileW(_In_ LPCWSTR lpFileName) throw() override {
     SetLastError(ERROR_NOT_CAPABLE);
     return FALSE;
   }
-  __override BOOL RemoveDirectoryW(_In_ LPCWSTR lpFileName) throw() {
+  BOOL RemoveDirectoryW(_In_ LPCWSTR lpFileName) throw() override {
     SetLastError(ERROR_NOT_CAPABLE);
     return FALSE;
   }
-  __override BOOL CreateDirectoryW(_In_ LPCWSTR lpPathName) throw() {
+  BOOL CreateDirectoryW(_In_ LPCWSTR lpPathName) throw() override {
     SetLastError(ERROR_NOT_CAPABLE);
     return FALSE;
   }
   _Success_(return != 0 && return < nBufferLength)
-    __override DWORD GetCurrentDirectoryW(_In_ DWORD nBufferLength, _Out_writes_to_opt_(nBufferLength, return +1) LPWSTR lpBuffer) throw() {
+    DWORD GetCurrentDirectoryW(_In_ DWORD nBufferLength, _Out_writes_to_opt_(nBufferLength, return +1) LPWSTR lpBuffer) throw() override {
     SetLastError(ERROR_NOT_CAPABLE);
     return FALSE;
   }
   _Success_(return != 0 && return < nSize)
-    __override DWORD GetMainModuleFileNameW(__out_ecount_part(nSize, return +1) LPWSTR lpFilename, DWORD nSize) throw() {
+    DWORD GetMainModuleFileNameW(__out_ecount_part(nSize, return +1) LPWSTR lpFilename, DWORD nSize) throw() override {
     SetLastError(ERROR_NOT_CAPABLE);
     return FALSE;
   }
-  __override DWORD GetTempPathW(DWORD nBufferLength, _Out_writes_to_opt_(nBufferLength, return +1) LPWSTR lpBuffer) {
+  DWORD GetTempPathW(DWORD nBufferLength, _Out_writes_to_opt_(nBufferLength, return +1) LPWSTR lpBuffer) override {
     SetLastError(ERROR_NOT_CAPABLE);
     return FALSE;
   }
-  __override BOOLEAN CreateSymbolicLinkW(_In_ LPCWSTR lpSymlinkFileName, _In_ LPCWSTR lpTargetFileName, DWORD dwFlags) throw() {
+  BOOLEAN CreateSymbolicLinkW(_In_ LPCWSTR lpSymlinkFileName, _In_ LPCWSTR lpTargetFileName, DWORD dwFlags) throw() override {
     SetLastError(ERROR_NOT_CAPABLE);
     return FALSE;
   }
-  __override bool SupportsCreateSymbolicLink() throw() {
+  bool SupportsCreateSymbolicLink() throw() override {
     return false;
   }
-  __override BOOL ReadFile(_In_ HANDLE hFile, _Out_bytecap_(nNumberOfBytesToRead) LPVOID lpBuffer, _In_ DWORD nNumberOfBytesToRead, _Out_opt_ LPDWORD lpNumberOfBytesRead) throw() {
+  BOOL ReadFile(_In_ HANDLE hFile, _Out_bytecap_(nNumberOfBytesToRead) LPVOID lpBuffer, _In_ DWORD nNumberOfBytesToRead, _Out_opt_ LPDWORD lpNumberOfBytesRead) throw() override {
     SetLastError(ERROR_NOT_CAPABLE);
     return FALSE;
   }
-  __override HANDLE CreateFileMappingW(
+  HANDLE CreateFileMappingW(
     _In_      HANDLE hFile,
     _In_      DWORD flProtect,
     _In_      DWORD dwMaximumSizeHigh,
-    _In_      DWORD dwMaximumSizeLow) throw() {
+    _In_      DWORD dwMaximumSizeLow) throw() override {
     SetLastError(ERROR_NOT_CAPABLE);
     return INVALID_HANDLE_VALUE;
   }
-  __override LPVOID MapViewOfFile(
+  LPVOID MapViewOfFile(
     _In_  HANDLE hFileMappingObject,
     _In_  DWORD dwDesiredAccess,
     _In_  DWORD dwFileOffsetHigh,
     _In_  DWORD dwFileOffsetLow,
-    _In_  SIZE_T dwNumberOfBytesToMap) throw() {
+    _In_  SIZE_T dwNumberOfBytesToMap) throw() override {
     SetLastError(ERROR_NOT_CAPABLE);
     return nullptr;
   }
-  __override BOOL UnmapViewOfFile(_In_ LPCVOID lpBaseAddress) throw() {
+  BOOL UnmapViewOfFile(_In_ LPCVOID lpBaseAddress) throw() override {
     SetLastError(ERROR_NOT_CAPABLE);
     return FALSE;
   }
 
   // Console APIs.
-  __override bool FileDescriptorIsDisplayed(int fd) throw() {
+  bool FileDescriptorIsDisplayed(int fd) throw() override {
     return false;
   }
-  __override unsigned GetColumnCount(DWORD nStdHandle) throw() {
+  unsigned GetColumnCount(DWORD nStdHandle) throw() override {
     return 80;
   }
-  __override unsigned GetConsoleOutputTextAttributes() throw() {
+  unsigned GetConsoleOutputTextAttributes() throw() override {
     return 0;
   }
-  __override void SetConsoleOutputTextAttributes(unsigned) throw() {
+  void SetConsoleOutputTextAttributes(unsigned) throw() override {
     __debugbreak();
   }
-  __override void ResetConsoleOutputTextAttributes() throw() {
+  void ResetConsoleOutputTextAttributes() throw() override {
     __debugbreak();
   }
 
@@ -628,19 +628,19 @@ public:
     if (fd == STDERR_FILENO) return StdErrHandle.Handle;
     return (HANDLE)(uintptr_t)(fd);
   }
-  __override int open_osfhandle(intptr_t osfhandle, int flags) throw() {
+  int open_osfhandle(intptr_t osfhandle, int flags) throw() override {
     DxcArgsHandle H((HANDLE)osfhandle);
     if (H == StdOutHandle.Handle) return STDOUT_FILENO;
     if (H == StdErrHandle.Handle) return STDERR_FILENO;
     return (int)(intptr_t)H.Handle;
   }
-  __override intptr_t get_osfhandle(int fd) throw() {
+  intptr_t get_osfhandle(int fd) throw() override {
     return (intptr_t)HandleFromFD(fd);
   }
-  __override int close(int fd) throw() {
+  int close(int fd) throw() override {
     return 0;
   }
-  __override long lseek(int fd, long offset, int origin) throw() {
+  long lseek(int fd, long offset, int origin) throw() override {
     CComPtr<IStream> stream;
     GetStreamForFD(fd, &stream);
     if (stream == nullptr) {
@@ -660,13 +660,13 @@ public:
 
     return newOffset.LowPart;
   }
-  __override int setmode(int fd, int mode) throw() {
+  int setmode(int fd, int mode) throw() override {
     return 0;
   }
-  __override errno_t resize_file(_In_ LPCWSTR path, uint64_t size) throw() {
+  errno_t resize_file(_In_ LPCWSTR path, uint64_t size) throw() override {
     return 0;
   }
-  __override int Read(int fd, _Out_bytecap_(count) void* buffer, unsigned int count) throw() {
+  int Read(int fd, _Out_bytecap_(count) void* buffer, unsigned int count) throw() override {
     CComPtr<IStream> stream;
     GetStreamForFD(fd, &stream);
     if (stream == nullptr) {
@@ -683,7 +683,7 @@ public:
 
     return (int)cbRead;
   }
-  __override int Write(int fd, _In_bytecount_(count) const void* buffer, unsigned int count) throw() {
+  int Write(int fd, _In_bytecount_(count) const void* buffer, unsigned int count) throw() override {
     CComPtr<IStream> stream;
     GetStreamForFD(fd, &stream);
     if (stream == nullptr) {
@@ -722,4 +722,4 @@ CreateDxcArgsFileSystem(
   return new DxcArgsFileSystemImpl(pSource, pSourceName, pIncludeHandler);
 }
 
-} // namespace dxcutil
+} // namespace dxcutil

+ 21 - 21
tools/clang/tools/dxcompiler/dxclibrary.cpp

@@ -34,10 +34,10 @@ public:
     return DoBasicQueryInterface<IDxcIncludeHandler>(this, iid, ppvObject);
   }
 
-  __override HRESULT STDMETHODCALLTYPE LoadSource(
+  HRESULT STDMETHODCALLTYPE LoadSource(
     _In_ LPCWSTR pFilename,                                   // Candidate filename.
     _COM_Outptr_result_maybenull_ IDxcBlob **ppIncludeSource  // Resultant source object for included file, nullptr if not found.
-    ) {
+    ) override {
     CComPtr<IDxcBlobEncoding> pEncoding;
     HRESULT hr = ::hlsl::DxcCreateBlobFromFile(m_pMalloc, pFilename, nullptr, &pEncoding);
     if (SUCCEEDED(hr)) {
@@ -58,48 +58,48 @@ public:
     return DoBasicQueryInterface<IDxcLibrary>(this, iid, ppvObject);
   }
 
-  __override HRESULT STDMETHODCALLTYPE SetMalloc(_In_opt_ IMalloc *pMalloc) {
+  HRESULT STDMETHODCALLTYPE SetMalloc(_In_opt_ IMalloc *pMalloc) override {
     UNREFERENCED_PARAMETER(pMalloc);
     return E_NOTIMPL;
   }
 
-  __override HRESULT STDMETHODCALLTYPE CreateBlobFromBlob(
-    _In_ IDxcBlob *pBlob, UINT32 offset, UINT32 length, _COM_Outptr_ IDxcBlob **ppResult) {
+  HRESULT STDMETHODCALLTYPE CreateBlobFromBlob(
+    _In_ IDxcBlob *pBlob, UINT32 offset, UINT32 length, _COM_Outptr_ IDxcBlob **ppResult) override {
     DxcThreadMalloc TM(m_pMalloc);
     return ::hlsl::DxcCreateBlobFromBlob(pBlob, offset, length, ppResult);
   }
 
-  __override HRESULT STDMETHODCALLTYPE CreateBlobFromFile(
+  HRESULT STDMETHODCALLTYPE CreateBlobFromFile(
     LPCWSTR pFileName, _In_opt_ UINT32* pCodePage,
-    _COM_Outptr_ IDxcBlobEncoding **pBlobEncoding) {
+    _COM_Outptr_ IDxcBlobEncoding **pBlobEncoding) override {
     DxcThreadMalloc TM(m_pMalloc);
     return ::hlsl::DxcCreateBlobFromFile(pFileName, pCodePage, pBlobEncoding);
   }
 
-  __override HRESULT STDMETHODCALLTYPE CreateBlobWithEncodingFromPinned(
+  HRESULT STDMETHODCALLTYPE CreateBlobWithEncodingFromPinned(
     LPBYTE pText, UINT32 size, UINT32 codePage,
-    _COM_Outptr_ IDxcBlobEncoding **pBlobEncoding) {
+    _COM_Outptr_ IDxcBlobEncoding **pBlobEncoding) override {
     DxcThreadMalloc TM(m_pMalloc);
     return ::hlsl::DxcCreateBlobWithEncodingFromPinned(pText, size, codePage, pBlobEncoding);
   }
 
-  __override HRESULT STDMETHODCALLTYPE CreateBlobWithEncodingOnHeapCopy(
+  HRESULT STDMETHODCALLTYPE CreateBlobWithEncodingOnHeapCopy(
       _In_bytecount_(size) LPCVOID pText, UINT32 size, UINT32 codePage,
-      _COM_Outptr_ IDxcBlobEncoding **pBlobEncoding) {
+      _COM_Outptr_ IDxcBlobEncoding **pBlobEncoding) override {
     DxcThreadMalloc TM(m_pMalloc);
     return ::hlsl::DxcCreateBlobWithEncodingOnHeapCopy(pText, size, codePage,
                                                        pBlobEncoding);
   }
 
-  __override HRESULT STDMETHODCALLTYPE CreateBlobWithEncodingOnMalloc(
+  HRESULT STDMETHODCALLTYPE CreateBlobWithEncodingOnMalloc(
     _In_bytecount_(size) LPCVOID pText, IMalloc *pIMalloc, UINT32 size, UINT32 codePage,
-    _COM_Outptr_ IDxcBlobEncoding **pBlobEncoding) {
+    _COM_Outptr_ IDxcBlobEncoding **pBlobEncoding) override {
     DxcThreadMalloc TM(m_pMalloc);
     return ::hlsl::DxcCreateBlobWithEncodingOnMalloc(pText, pIMalloc, size, codePage, pBlobEncoding);
   }
 
-  __override HRESULT STDMETHODCALLTYPE CreateIncludeHandler(
-    _COM_Outptr_ IDxcIncludeHandler **ppResult) {
+  HRESULT STDMETHODCALLTYPE CreateIncludeHandler(
+    _COM_Outptr_ IDxcIncludeHandler **ppResult) override {
     DxcThreadMalloc TM(m_pMalloc);
     CComPtr<DxcIncludeHandlerForFS> result;
     result = DxcIncludeHandlerForFS::Alloc(m_pMalloc);
@@ -110,20 +110,20 @@ public:
     return S_OK;
   }
 
-  __override HRESULT STDMETHODCALLTYPE CreateStreamFromBlobReadOnly(
-    _In_ IDxcBlob *pBlob, _COM_Outptr_ IStream **ppStream) {
+  HRESULT STDMETHODCALLTYPE CreateStreamFromBlobReadOnly(
+    _In_ IDxcBlob *pBlob, _COM_Outptr_ IStream **ppStream) override {
     DxcThreadMalloc TM(m_pMalloc);
     return ::hlsl::CreateReadOnlyBlobStream(pBlob, ppStream);
   }
 
-  __override HRESULT STDMETHODCALLTYPE GetBlobAsUtf8(
-    _In_ IDxcBlob *pBlob, _COM_Outptr_ IDxcBlobEncoding **pBlobEncoding) {
+  HRESULT STDMETHODCALLTYPE GetBlobAsUtf8(
+    _In_ IDxcBlob *pBlob, _COM_Outptr_ IDxcBlobEncoding **pBlobEncoding) override {
     DxcThreadMalloc TM(m_pMalloc);
     return ::hlsl::DxcGetBlobAsUtf8(pBlob, pBlobEncoding);
   }
 
-  __override HRESULT STDMETHODCALLTYPE GetBlobAsUtf16(
-    _In_ IDxcBlob *pBlob, _COM_Outptr_ IDxcBlobEncoding **pBlobEncoding) {
+  HRESULT STDMETHODCALLTYPE GetBlobAsUtf16(
+    _In_ IDxcBlob *pBlob, _COM_Outptr_ IDxcBlobEncoding **pBlobEncoding) override {
     return ::hlsl::DxcGetBlobAsUtf16(pBlob, m_pMalloc, pBlobEncoding);
   }
 };

+ 9 - 9
tools/clang/tools/dxcompiler/dxclinker.cpp

@@ -48,14 +48,14 @@ public:
   DXC_MICROCOM_TM_CTOR(DxcLinker)
 
   // Register a library with name to ref it later.
-  __override HRESULT RegisterLibrary(
+  HRESULT RegisterLibrary(
       _In_opt_ LPCWSTR pLibName, // Name of the library.
       _In_ IDxcBlob *pLib        // Library to add.
-  );
+  ) override;
 
   // Links the shader and produces a shader blob that the Direct3D runtime can
   // use.
-  __override HRESULT STDMETHODCALLTYPE Link(
+  HRESULT STDMETHODCALLTYPE Link(
       _In_opt_ LPCWSTR pEntryName, // Entry point name
       _In_ LPCWSTR pTargetProfile, // shader profile to link
       _In_count_(libCount)
@@ -66,10 +66,10 @@ public:
       _In_ UINT32 argCount,          // Number of arguments
       _COM_Outptr_ IDxcOperationResult *
           *ppResult // Linker output status, buffer, and errors
-  );
+  ) override;
 
-  __override HRESULT STDMETHODCALLTYPE RegisterDxilContainerEventHandler(
-      IDxcContainerEventsHandler *pHandler, UINT64 *pCookie) {
+  HRESULT STDMETHODCALLTYPE RegisterDxilContainerEventHandler(
+      IDxcContainerEventsHandler *pHandler, UINT64 *pCookie) override {
     DxcThreadMalloc TM(m_pMalloc);
     DXASSERT(m_pDxcContainerEventsHandler == nullptr,
              "else events handler is already registered");
@@ -77,8 +77,8 @@ public:
     m_pDxcContainerEventsHandler = pHandler;
     return S_OK;
   };
-  __override HRESULT STDMETHODCALLTYPE
-  UnRegisterDxilContainerEventHandler(UINT64 cookie) {
+  HRESULT STDMETHODCALLTYPE
+  UnRegisterDxilContainerEventHandler(UINT64 cookie) override {
     DxcThreadMalloc TM(m_pMalloc);
     DXASSERT(m_pDxcContainerEventsHandler != nullptr,
              "else unregister should not have been called");
@@ -260,4 +260,4 @@ HRESULT CreateDxcLinker(_In_ REFIID riid, _Out_ LPVOID *ppv) {
     return result.p->QueryInterface(riid, ppv);
   }
   CATCH_CPP_RETURN_HRESULT();
-}
+}

+ 12 - 12
tools/clang/tools/dxcompiler/dxcompilerobj.cpp

@@ -241,13 +241,13 @@ public:
   DXC_MICROCOM_TM_CTOR(DxcCompiler)
   DXC_LANGEXTENSIONS_HELPER_IMPL(m_langExtensionsHelper)
 
-  __override HRESULT STDMETHODCALLTYPE RegisterDxilContainerEventHandler(IDxcContainerEventsHandler *pHandler, UINT64 *pCookie) {
+  HRESULT STDMETHODCALLTYPE RegisterDxilContainerEventHandler(IDxcContainerEventsHandler *pHandler, UINT64 *pCookie) override {
     DXASSERT(m_pDxcContainerEventsHandler == nullptr, "else events handler is already registered");
     *pCookie = 1; // Only one EventsHandler supported 
     m_pDxcContainerEventsHandler = pHandler;
     return S_OK;
   };
-  __override HRESULT STDMETHODCALLTYPE UnRegisterDxilContainerEventHandler(UINT64 cookie) {
+  HRESULT STDMETHODCALLTYPE UnRegisterDxilContainerEventHandler(UINT64 cookie) override {
     DXASSERT(m_pDxcContainerEventsHandler != nullptr, "else unregister should not have been called");
     m_pDxcContainerEventsHandler.Release();
     return S_OK;
@@ -263,7 +263,7 @@ public:
   }
 
   // Compile a single entry point to the target shader model
-  __override HRESULT STDMETHODCALLTYPE Compile(
+  HRESULT STDMETHODCALLTYPE Compile(
     _In_ IDxcBlob *pSource,                       // Source text to compile
     _In_opt_ LPCWSTR pSourceName,                 // Optional file name for pSource. Used in errors and include handlers.
     _In_ LPCWSTR pEntryPoint,                     // entry point name
@@ -274,14 +274,14 @@ public:
     _In_ UINT32 defineCount,                      // Number of defines
     _In_opt_ IDxcIncludeHandler *pIncludeHandler, // user-provided interface to handle #include directives (optional)
     _COM_Outptr_ IDxcOperationResult **ppResult   // Compiler output status, buffer, and errors
-  ) {
+  ) override {
     return CompileWithDebug(pSource, pSourceName, pEntryPoint, pTargetProfile,
                             pArguments, argCount, pDefines, defineCount,
                             pIncludeHandler, ppResult, nullptr, nullptr);
   }
 
   // Compile a single entry point to the target shader model with debug information.
-  __override HRESULT STDMETHODCALLTYPE CompileWithDebug(
+  HRESULT STDMETHODCALLTYPE CompileWithDebug(
     _In_ IDxcBlob *pSource,                       // Source text to compile
     _In_opt_ LPCWSTR pSourceName,                 // Optional file name for pSource. Used in errors and include handlers.
     _In_ LPCWSTR pEntryPoint,                     // Entry point name
@@ -294,7 +294,7 @@ public:
     _COM_Outptr_ IDxcOperationResult **ppResult,  // Compiler output status, buffer, and errors
     _Outptr_opt_result_z_ LPWSTR *ppDebugBlobName,// Suggested file name for debug blob.
     _COM_Outptr_opt_ IDxcBlob **ppDebugBlob       // Debug blob
-  ) {
+  ) override {
     if (pSource == nullptr || ppResult == nullptr ||
         (defineCount > 0 && pDefines == nullptr) ||
         (argCount > 0 && pArguments == nullptr) || pEntryPoint == nullptr ||
@@ -599,7 +599,7 @@ public:
   }
 
   // Preprocess source text
-  __override HRESULT STDMETHODCALLTYPE Preprocess(
+  HRESULT STDMETHODCALLTYPE Preprocess(
     _In_ IDxcBlob *pSource,                       // Source text to preprocess
     _In_opt_ LPCWSTR pSourceName,                 // Optional file name for pSource. Used in errors and include handlers.
     _In_count_(argCount) LPCWSTR *pArguments,     // Array of pointers to arguments
@@ -608,7 +608,7 @@ public:
     _In_ UINT32 defineCount,                      // Number of defines
     _In_opt_ IDxcIncludeHandler *pIncludeHandler, // user-provided interface to handle #include directives (optional)
     _COM_Outptr_ IDxcOperationResult **ppResult   // Preprocessor output status, buffer, and errors
-    ) {
+    ) override {
     if (pSource == nullptr || ppResult == nullptr ||
         (defineCount > 0 && pDefines == nullptr) ||
         (argCount > 0 && pArguments == nullptr))
@@ -717,10 +717,10 @@ public:
   }
 
   // Disassemble a shader.
-  __override HRESULT STDMETHODCALLTYPE Disassemble(
+  HRESULT STDMETHODCALLTYPE Disassemble(
     _In_ IDxcBlob *pProgram,                      // Program to disassemble.
     _COM_Outptr_ IDxcBlobEncoding** ppDisassembly // Disassembly text.
-    ) {
+    ) override {
     if (pProgram == nullptr || ppDisassembly == nullptr)
       return E_INVALIDARG;
 
@@ -897,14 +897,14 @@ public:
   }
 
   // IDxcVersionInfo
-  __override HRESULT STDMETHODCALLTYPE GetVersion(_Out_ UINT32 *pMajor, _Out_ UINT32 *pMinor) {
+  HRESULT STDMETHODCALLTYPE GetVersion(_Out_ UINT32 *pMajor, _Out_ UINT32 *pMinor) override {
     if (pMajor == nullptr || pMinor == nullptr)
       return E_INVALIDARG;
     *pMajor = DXIL::kDxilMajor;
     *pMinor = DXIL::kDxilMinor;
     return S_OK;
   }
-  __override HRESULT STDMETHODCALLTYPE GetFlags(_Out_ UINT32 *pFlags) {
+  HRESULT STDMETHODCALLTYPE GetFlags(_Out_ UINT32 *pFlags) override {
     if (pFlags == nullptr)
       return E_INVALIDARG;
     *pFlags = DxcVersionInfoFlags_None;

+ 4 - 4
tools/clang/tools/dxcompiler/dxcontainerbuilder.cpp

@@ -29,10 +29,10 @@ HRESULT CreateDxcValidator(_In_ REFIID riid, _Out_ LPVOID *ppv);
 
 class DxcContainerBuilder : public IDxcContainerBuilder {
 public:
-  __override HRESULT STDMETHODCALLTYPE Load(_In_ IDxcBlob *pDxilContainerHeader); // Loads DxilContainer to the builder
-  __override HRESULT STDMETHODCALLTYPE AddPart(_In_ UINT32 fourCC, _In_ IDxcBlob *pSource); // Add the given part with fourCC
-  __override HRESULT STDMETHODCALLTYPE RemovePart(_In_ UINT32 fourCC);                // Remove the part with fourCC
-  __override HRESULT STDMETHODCALLTYPE SerializeContainer(_Out_ IDxcOperationResult **ppResult); // Builds a container of the given container builder state
+  HRESULT STDMETHODCALLTYPE Load(_In_ IDxcBlob *pDxilContainerHeader) override; // Loads DxilContainer to the builder
+  HRESULT STDMETHODCALLTYPE AddPart(_In_ UINT32 fourCC, _In_ IDxcBlob *pSource) override; // Add the given part with fourCC
+  HRESULT STDMETHODCALLTYPE RemovePart(_In_ UINT32 fourCC) override;                // Remove the part with fourCC
+  HRESULT STDMETHODCALLTYPE SerializeContainer(_Out_ IDxcOperationResult **ppResult) override; // Builds a container of the given container builder state
 
   DXC_MICROCOM_TM_ADDREF_RELEASE_IMPL()
   DXC_MICROCOM_TM_CTOR(DxcContainerBuilder)

+ 4 - 4
tools/clang/tools/dxcompiler/dxcvalidator.cpp

@@ -79,15 +79,15 @@ public:
   );
 
   // IDxcValidator
-  __override HRESULT STDMETHODCALLTYPE Validate(
+  HRESULT STDMETHODCALLTYPE Validate(
     _In_ IDxcBlob *pShader,                       // Shader to validate.
     _In_ UINT32 Flags,                            // Validation flags.
     _COM_Outptr_ IDxcOperationResult **ppResult   // Validation output status, buffer, and errors
-    );
+    ) override;
 
   // IDxcVersionInfo
-  __override HRESULT STDMETHODCALLTYPE GetVersion(_Out_ UINT32 *pMajor, _Out_ UINT32 *pMinor);
-  __override HRESULT STDMETHODCALLTYPE GetFlags(_Out_ UINT32 *pFlags);
+  HRESULT STDMETHODCALLTYPE GetVersion(_Out_ UINT32 *pMajor, _Out_ UINT32 *pMinor) override;
+  HRESULT STDMETHODCALLTYPE GetFlags(_Out_ UINT32 *pFlags) override;
 };
 
 // Compile a single entry point to the target shader model

+ 3 - 3
tools/clang/tools/dxlib-sample/lib_share_preprocessor.cpp

@@ -57,14 +57,14 @@ public:
   }
   IncPathIncludeHandler(IDxcIncludeHandler *handler, std::vector<std::string> &includePathList)
       : m_dwRef(0), m_pIncludeHandler(handler), m_includePathList(includePathList) {}
-  __override HRESULT STDMETHODCALLTYPE LoadSource(
+  HRESULT STDMETHODCALLTYPE LoadSource(
       _In_ LPCWSTR pFilename, // Candidate filename.
       _COM_Outptr_result_maybenull_ IDxcBlob **ppIncludeSource // Resultant
                                                                // source object
                                                                // for included
                                                                // file, nullptr
                                                                // if not found.
-  ) {
+  ) override {
     CW2A pUtf8Filename(pFilename);
     if (m_loadedFileNames.find(pUtf8Filename.m_psz) !=
         m_loadedFileNames.end()) {
@@ -203,4 +203,4 @@ HRESULT IncludeToLibPreprocessorImpl::Preprocess(
 std::unique_ptr<IncludeToLibPreprocessor>
   IncludeToLibPreprocessor::CreateIncludeToLibPreprocessor(IDxcIncludeHandler *handler) {
   return llvm::make_unique<IncludeToLibPreprocessorImpl>(handler);
-}
+}

+ 3 - 3
tools/clang/tools/libclang/dxcisenseimpl.cpp

@@ -69,9 +69,9 @@ public:
   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);
 
-  __override HRESULT STDMETHODCALLTYPE GetFileName(_Outptr_result_z_ LPSTR* pFileName);
-  __override HRESULT STDMETHODCALLTYPE GetContents(_Outptr_result_z_ LPSTR* pContents);
-  __override HRESULT STDMETHODCALLTYPE GetLength(_Out_ unsigned* pLength);
+  HRESULT STDMETHODCALLTYPE GetFileName(_Outptr_result_z_ LPSTR* pFileName) override;
+  HRESULT STDMETHODCALLTYPE GetContents(_Outptr_result_z_ LPSTR* pContents) override;
+  HRESULT STDMETHODCALLTYPE GetLength(_Out_ unsigned* pLength) override;
 };
 
 ///////////////////////////////////////////////////////////////////////////////

+ 85 - 85
tools/clang/tools/libclang/dxcisenseimpl.h

@@ -47,36 +47,36 @@ public:
   void Initialize(const CXCursor& cursor);
   static HRESULT Create(const CXCursor& cursor, _Outptr_result_nullonfailure_ IDxcCursor** pObject);
 
-  __override HRESULT STDMETHODCALLTYPE GetExtent(_Outptr_result_nullonfailure_ IDxcSourceRange** pRange);
-  __override HRESULT STDMETHODCALLTYPE GetLocation(_Outptr_result_nullonfailure_ IDxcSourceLocation** pResult);
-  __override HRESULT STDMETHODCALLTYPE GetKind(_Out_ DxcCursorKind* pResult);
-  __override HRESULT STDMETHODCALLTYPE GetKindFlags(_Out_ DxcCursorKindFlags* pResult);
-  __override HRESULT STDMETHODCALLTYPE GetSemanticParent(_Outptr_result_nullonfailure_ IDxcCursor** pResult);
-  __override HRESULT STDMETHODCALLTYPE GetLexicalParent(_Outptr_result_nullonfailure_ IDxcCursor** pResult);
-  __override HRESULT STDMETHODCALLTYPE GetCursorType(_Outptr_result_nullonfailure_ IDxcType** pResult);
-  __override HRESULT STDMETHODCALLTYPE GetNumArguments(_Out_ int* pResult);
-  __override HRESULT STDMETHODCALLTYPE GetArgumentAt(int index, _Outptr_result_nullonfailure_ IDxcCursor** pResult);
-  __override HRESULT STDMETHODCALLTYPE GetReferencedCursor(_Outptr_result_nullonfailure_ IDxcCursor** pResult);
-  __override HRESULT STDMETHODCALLTYPE GetDefinitionCursor(_Outptr_result_nullonfailure_ IDxcCursor** pResult);
-  __override HRESULT STDMETHODCALLTYPE FindReferencesInFile(
+  HRESULT STDMETHODCALLTYPE GetExtent(_Outptr_result_nullonfailure_ IDxcSourceRange** pRange) override;
+  HRESULT STDMETHODCALLTYPE GetLocation(_Outptr_result_nullonfailure_ IDxcSourceLocation** pResult) override;
+  HRESULT STDMETHODCALLTYPE GetKind(_Out_ DxcCursorKind* pResult) override;
+  HRESULT STDMETHODCALLTYPE GetKindFlags(_Out_ DxcCursorKindFlags* pResult) override;
+  HRESULT STDMETHODCALLTYPE GetSemanticParent(_Outptr_result_nullonfailure_ IDxcCursor** pResult) override;
+  HRESULT STDMETHODCALLTYPE GetLexicalParent(_Outptr_result_nullonfailure_ IDxcCursor** pResult) override;
+  HRESULT STDMETHODCALLTYPE GetCursorType(_Outptr_result_nullonfailure_ IDxcType** pResult) override;
+  HRESULT STDMETHODCALLTYPE GetNumArguments(_Out_ int* pResult) override;
+  HRESULT STDMETHODCALLTYPE GetArgumentAt(int index, _Outptr_result_nullonfailure_ IDxcCursor** pResult) override;
+  HRESULT STDMETHODCALLTYPE GetReferencedCursor(_Outptr_result_nullonfailure_ IDxcCursor** pResult) override;
+  HRESULT STDMETHODCALLTYPE GetDefinitionCursor(_Outptr_result_nullonfailure_ IDxcCursor** pResult) override;
+  HRESULT STDMETHODCALLTYPE FindReferencesInFile(
     _In_ IDxcFile* file, unsigned skip, unsigned top,
-    _Out_ unsigned* pResultLength, _Outptr_result_buffer_maybenull_(*pResultLength) IDxcCursor*** pResult);
-  __override HRESULT STDMETHODCALLTYPE GetSpelling(_Outptr_result_maybenull_ LPSTR* pResult);
-  __override HRESULT STDMETHODCALLTYPE IsEqualTo(_In_ IDxcCursor* other, _Out_ BOOL* pResult);
-  __override HRESULT STDMETHODCALLTYPE IsNull(_Out_ BOOL* pResult);
-  __override HRESULT STDMETHODCALLTYPE IsDefinition(_Out_ BOOL* pResult);
+    _Out_ unsigned* pResultLength, _Outptr_result_buffer_maybenull_(*pResultLength) IDxcCursor*** pResult) override;
+  HRESULT STDMETHODCALLTYPE GetSpelling(_Outptr_result_maybenull_ LPSTR* pResult) override;
+  HRESULT STDMETHODCALLTYPE IsEqualTo(_In_ IDxcCursor* other, _Out_ BOOL* pResult) override;
+  HRESULT STDMETHODCALLTYPE IsNull(_Out_ BOOL* pResult) override;
+  HRESULT STDMETHODCALLTYPE IsDefinition(_Out_ BOOL* pResult) override;
   /// <summary>Gets the display name for the cursor, including e.g. parameter types for a function.</summary>
-  __override HRESULT STDMETHODCALLTYPE GetDisplayName(_Outptr_result_maybenull_ BSTR* pResult);
+  HRESULT STDMETHODCALLTYPE GetDisplayName(_Outptr_result_maybenull_ BSTR* pResult) override;
   /// <summary>Gets the qualified name for the symbol the cursor refers to.</summary>
-  __override HRESULT STDMETHODCALLTYPE GetQualifiedName(BOOL includeTemplateArgs, _Outptr_result_maybenull_ BSTR* pResult);
+  HRESULT STDMETHODCALLTYPE GetQualifiedName(BOOL includeTemplateArgs, _Outptr_result_maybenull_ BSTR* pResult) override;
   /// <summary>Gets a name for the cursor, applying the specified formatting flags.</summary>
-  __override HRESULT STDMETHODCALLTYPE GetFormattedName(DxcCursorFormatting formatting, _Outptr_result_maybenull_ BSTR* pResult);
+  HRESULT STDMETHODCALLTYPE GetFormattedName(DxcCursorFormatting formatting, _Outptr_result_maybenull_ BSTR* pResult) override;
   /// <summary>Gets children in pResult up to top elements.</summary>
-  __override HRESULT STDMETHODCALLTYPE GetChildren(
+  HRESULT STDMETHODCALLTYPE GetChildren(
     unsigned skip, unsigned top,
-    _Out_ unsigned* pResultLength, _Outptr_result_buffer_maybenull_(*pResultLength) IDxcCursor*** pResult);
+    _Out_ unsigned* pResultLength, _Outptr_result_buffer_maybenull_(*pResultLength) IDxcCursor*** pResult) override;
   /// <summary>Gets the cursor following a location within a compound cursor.</summary>
-  __override HRESULT STDMETHODCALLTYPE GetSnappedChild(_In_ IDxcSourceLocation* location, _Outptr_result_maybenull_ IDxcCursor** pResult);
+  HRESULT STDMETHODCALLTYPE GetSnappedChild(_In_ IDxcSourceLocation* location, _Outptr_result_maybenull_ IDxcCursor** pResult) override;
 };
 
 class DxcDiagnostic : public IDxcDiagnostic
@@ -96,18 +96,18 @@ public:
   void Initialize(const CXDiagnostic& diagnostic);
   static HRESULT Create(const CXDiagnostic& diagnostic, _Outptr_result_nullonfailure_ IDxcDiagnostic** pObject);
 
-  __override HRESULT STDMETHODCALLTYPE FormatDiagnostic(
+  HRESULT STDMETHODCALLTYPE FormatDiagnostic(
     DxcDiagnosticDisplayOptions options,
-    _Outptr_result_maybenull_ LPSTR* pResult);
-  __override HRESULT STDMETHODCALLTYPE GetSeverity(_Out_ DxcDiagnosticSeverity* pResult);
-  __override HRESULT STDMETHODCALLTYPE GetLocation(_Outptr_result_nullonfailure_ IDxcSourceLocation** pResult);
-  __override HRESULT STDMETHODCALLTYPE GetSpelling(_Outptr_result_maybenull_ LPSTR* pResult);
-  __override HRESULT STDMETHODCALLTYPE GetCategoryText(_Outptr_result_maybenull_ LPSTR* pResult);
-  __override HRESULT STDMETHODCALLTYPE GetNumRanges(_Out_ unsigned* pResult);
-  __override HRESULT STDMETHODCALLTYPE GetRangeAt(unsigned index, _Outptr_result_nullonfailure_ IDxcSourceRange** pResult);
-  __override HRESULT STDMETHODCALLTYPE GetNumFixIts(_Out_ unsigned* pResult);
-  __override HRESULT STDMETHODCALLTYPE GetFixItAt(unsigned index,
-    _Outptr_result_nullonfailure_ IDxcSourceRange** pReplacementRange, _Outptr_result_maybenull_ LPSTR* pText);
+    _Outptr_result_maybenull_ LPSTR* pResult) override;
+  HRESULT STDMETHODCALLTYPE GetSeverity(_Out_ DxcDiagnosticSeverity* pResult) override;
+  HRESULT STDMETHODCALLTYPE GetLocation(_Outptr_result_nullonfailure_ IDxcSourceLocation** pResult) override;
+  HRESULT STDMETHODCALLTYPE GetSpelling(_Outptr_result_maybenull_ LPSTR* pResult) override;
+  HRESULT STDMETHODCALLTYPE GetCategoryText(_Outptr_result_maybenull_ LPSTR* pResult) override;
+  HRESULT STDMETHODCALLTYPE GetNumRanges(_Out_ unsigned* pResult) override;
+  HRESULT STDMETHODCALLTYPE GetRangeAt(unsigned index, _Outptr_result_nullonfailure_ IDxcSourceRange** pResult) override;
+  HRESULT STDMETHODCALLTYPE GetNumFixIts(_Out_ unsigned* pResult) override;
+  HRESULT STDMETHODCALLTYPE GetFixItAt(unsigned index,
+    _Outptr_result_nullonfailure_ IDxcSourceRange** pReplacementRange, _Outptr_result_maybenull_ LPSTR* pText) override;
 };
 
 class DxcFile : public IDxcFile
@@ -128,8 +128,8 @@ public:
   static HRESULT Create(const CXFile& file, _Outptr_result_nullonfailure_ IDxcFile** pObject);
 
   const CXFile& GetFile() const { return m_file; }
-  __override HRESULT STDMETHODCALLTYPE GetName(_Outptr_result_maybenull_ LPSTR* pResult);
-  __override HRESULT STDMETHODCALLTYPE IsEqualTo(_In_ IDxcFile* other, _Out_ BOOL* pResult);
+  HRESULT STDMETHODCALLTYPE GetName(_Outptr_result_maybenull_ LPSTR* pResult) override;
+  HRESULT STDMETHODCALLTYPE IsEqualTo(_In_ IDxcFile* other, _Out_ BOOL* pResult) override;
 };
 
 class DxcInclusion : public IDxcInclusion
@@ -152,9 +152,9 @@ public:
   HRESULT Initialize(CXFile file, unsigned locations, _In_count_(locations) CXSourceLocation *pLocation);
   static HRESULT Create(CXFile file, unsigned locations, _In_count_(locations) CXSourceLocation *pLocation, _COM_Outptr_ IDxcInclusion **pResult);
 
-  __override HRESULT STDMETHODCALLTYPE GetIncludedFile(_Outptr_result_nullonfailure_ IDxcFile** pResult);
-  __override HRESULT STDMETHODCALLTYPE GetStackLength(_Out_ unsigned *pResult);
-  __override HRESULT STDMETHODCALLTYPE GetStackItem(unsigned index, _Outptr_result_nullonfailure_ IDxcSourceLocation **pResult);
+  HRESULT STDMETHODCALLTYPE GetIncludedFile(_Outptr_result_nullonfailure_ IDxcFile** pResult) override;
+  HRESULT STDMETHODCALLTYPE GetStackLength(_Out_ unsigned *pResult) override;
+  HRESULT STDMETHODCALLTYPE GetStackItem(unsigned index, _Outptr_result_nullonfailure_ IDxcSourceLocation **pResult) override;
 };
 
 class DxcIndex : public IDxcIndex
@@ -176,16 +176,16 @@ public:
     HRESULT Initialize(hlsl::DxcLangExtensionsHelper& langHelper);
     static HRESULT Create(hlsl::DxcLangExtensionsHelper& langHelper, _Outptr_result_nullonfailure_ DxcIndex** index);
 
-    __override HRESULT STDMETHODCALLTYPE SetGlobalOptions(DxcGlobalOptions options);
-    __override HRESULT STDMETHODCALLTYPE GetGlobalOptions(_Out_ DxcGlobalOptions* options);
-    __override HRESULT STDMETHODCALLTYPE ParseTranslationUnit(
+    HRESULT STDMETHODCALLTYPE SetGlobalOptions(DxcGlobalOptions options) override;
+    HRESULT STDMETHODCALLTYPE GetGlobalOptions(_Out_ DxcGlobalOptions* options) override;
+    HRESULT STDMETHODCALLTYPE ParseTranslationUnit(
       _In_z_ const char *source_filename,
       _In_count_(num_command_line_args) const char * const *command_line_args,
       int num_command_line_args,
       _In_count_(num_unsaved_files) IDxcUnsavedFile** unsaved_files,
       unsigned num_unsaved_files,
       DxcTranslationUnitFlags options,
-      _Outptr_result_nullonfailure_ IDxcTranslationUnit** pTranslationUnit);
+      _Outptr_result_nullonfailure_ IDxcTranslationUnit** pTranslationUnit) override;
 };
 
 class DxcIntelliSense : public IDxcIntelliSense, public IDxcLangExtensions {
@@ -204,19 +204,19 @@ public:
 
   DxcIntelliSense(IMalloc *pMalloc);
 
-    __override HRESULT STDMETHODCALLTYPE CreateIndex(_Outptr_result_nullonfailure_ IDxcIndex** index);
-    __override HRESULT STDMETHODCALLTYPE GetNullLocation(_Outptr_result_nullonfailure_ IDxcSourceLocation** location);
-    __override HRESULT STDMETHODCALLTYPE GetNullRange(_Outptr_result_nullonfailure_ IDxcSourceRange** location);
-    __override HRESULT STDMETHODCALLTYPE GetRange(
+    HRESULT STDMETHODCALLTYPE CreateIndex(_Outptr_result_nullonfailure_ IDxcIndex** index) override;
+    HRESULT STDMETHODCALLTYPE GetNullLocation(_Outptr_result_nullonfailure_ IDxcSourceLocation** location) override;
+    HRESULT STDMETHODCALLTYPE GetNullRange(_Outptr_result_nullonfailure_ IDxcSourceRange** location) override;
+    HRESULT STDMETHODCALLTYPE GetRange(
       _In_ IDxcSourceLocation* start,
       _In_ IDxcSourceLocation* end,
-      _Outptr_result_nullonfailure_ IDxcSourceRange** location);
-    __override HRESULT STDMETHODCALLTYPE GetDefaultDiagnosticDisplayOptions(
-      _Out_ DxcDiagnosticDisplayOptions* pValue);
-    __override HRESULT STDMETHODCALLTYPE GetDefaultEditingTUOptions(_Out_ DxcTranslationUnitFlags* pValue);
-    __override HRESULT STDMETHODCALLTYPE CreateUnsavedFile(
+      _Outptr_result_nullonfailure_ IDxcSourceRange** location) override;
+    HRESULT STDMETHODCALLTYPE GetDefaultDiagnosticDisplayOptions(
+      _Out_ DxcDiagnosticDisplayOptions* pValue) override;
+    HRESULT STDMETHODCALLTYPE GetDefaultEditingTUOptions(_Out_ DxcTranslationUnitFlags* pValue) override;
+    HRESULT STDMETHODCALLTYPE CreateUnsavedFile(
       _In_ LPCSTR fileName, _In_ LPCSTR contents, unsigned contentLength,
-      _Outptr_result_nullonfailure_ IDxcUnsavedFile** pResult);
+      _Outptr_result_nullonfailure_ IDxcUnsavedFile** pResult) override;
 };
 
 class DxcSourceLocation : public IDxcSourceLocation
@@ -237,13 +237,13 @@ public:
   static HRESULT Create(const CXSourceLocation& location, _Outptr_result_nullonfailure_ IDxcSourceLocation** pObject);
 
   const CXSourceLocation& GetLocation() const { return m_location; }
-  __override HRESULT STDMETHODCALLTYPE IsEqualTo(_In_ IDxcSourceLocation* other, _Out_ BOOL* pValue);
-  __override HRESULT STDMETHODCALLTYPE GetSpellingLocation(
+  HRESULT STDMETHODCALLTYPE IsEqualTo(_In_ IDxcSourceLocation* other, _Out_ BOOL* pValue) override;
+  HRESULT STDMETHODCALLTYPE GetSpellingLocation(
     _Outptr_opt_ IDxcFile** pFile,
     _Out_opt_ unsigned* pLine,
     _Out_opt_ unsigned* pCol,
-    _Out_opt_ unsigned* pOffset);
-  __override HRESULT STDMETHODCALLTYPE IsNull(_Out_ BOOL* pResult);
+    _Out_opt_ unsigned* pOffset) override;
+  HRESULT STDMETHODCALLTYPE IsNull(_Out_ BOOL* pResult) override;
 };
 
 class DxcSourceRange : public IDxcSourceRange
@@ -264,10 +264,10 @@ public:
   static HRESULT Create(const CXSourceRange& range, _Outptr_result_nullonfailure_ IDxcSourceRange** pObject);
 
   const CXSourceRange& GetRange() const { return m_range; }
-  __override HRESULT STDMETHODCALLTYPE IsNull(_Out_ BOOL* pValue);
-  __override HRESULT STDMETHODCALLTYPE GetStart(_Outptr_result_nullonfailure_ IDxcSourceLocation** pValue);
-  __override HRESULT STDMETHODCALLTYPE GetEnd(_Outptr_result_nullonfailure_ IDxcSourceLocation** pValue);
-  __override HRESULT STDMETHODCALLTYPE GetOffsets(_Out_ unsigned* startOffset, _Out_ unsigned* endOffset);
+  HRESULT STDMETHODCALLTYPE IsNull(_Out_ BOOL* pValue) override;
+  HRESULT STDMETHODCALLTYPE GetStart(_Outptr_result_nullonfailure_ IDxcSourceLocation** pValue) override;
+  HRESULT STDMETHODCALLTYPE GetEnd(_Outptr_result_nullonfailure_ IDxcSourceLocation** pValue) override;
+  HRESULT STDMETHODCALLTYPE GetOffsets(_Out_ unsigned* startOffset, _Out_ unsigned* endOffset) override;
 };
 
 class DxcToken : public IDxcToken
@@ -288,10 +288,10 @@ public:
   void Initialize(const CXTranslationUnit& tu, const CXToken& token);
   static HRESULT Create(const CXTranslationUnit& tu, const CXToken& token, _Outptr_result_nullonfailure_ IDxcToken** pObject);
 
-  __override HRESULT STDMETHODCALLTYPE GetKind(_Out_ DxcTokenKind* pValue);
-  __override HRESULT STDMETHODCALLTYPE GetLocation(_Outptr_result_nullonfailure_ IDxcSourceLocation** pValue);
-  __override HRESULT STDMETHODCALLTYPE GetExtent(_Outptr_result_nullonfailure_ IDxcSourceRange** pValue);
-  __override HRESULT STDMETHODCALLTYPE GetSpelling(_Outptr_result_maybenull_ LPSTR* pValue);
+  HRESULT STDMETHODCALLTYPE GetKind(_Out_ DxcTokenKind* pValue) override;
+  HRESULT STDMETHODCALLTYPE GetLocation(_Outptr_result_nullonfailure_ IDxcSourceLocation** pValue) override;
+  HRESULT STDMETHODCALLTYPE GetExtent(_Outptr_result_nullonfailure_ IDxcSourceRange** pValue) override;
+  HRESULT STDMETHODCALLTYPE GetSpelling(_Outptr_result_maybenull_ LPSTR* pValue) override;
 };
 
 class DxcTranslationUnit : public IDxcTranslationUnit
@@ -310,34 +310,34 @@ public:
     ~DxcTranslationUnit();
     void Initialize(CXTranslationUnit tu);
 
-    __override HRESULT STDMETHODCALLTYPE GetCursor(_Outptr_ IDxcCursor** pCursor);
-    __override HRESULT STDMETHODCALLTYPE Tokenize(
+    HRESULT STDMETHODCALLTYPE GetCursor(_Outptr_ IDxcCursor** pCursor) override;
+    HRESULT STDMETHODCALLTYPE Tokenize(
       _In_ IDxcSourceRange* range,
       _Outptr_result_buffer_maybenull_(*pTokenCount) IDxcToken*** pTokens,
-      _Out_ unsigned* pTokenCount);
-    __override HRESULT STDMETHODCALLTYPE GetLocation(
+      _Out_ unsigned* pTokenCount) override;
+    HRESULT STDMETHODCALLTYPE GetLocation(
       _In_ IDxcFile* file,
       unsigned line, unsigned column,
-      _Outptr_result_nullonfailure_ IDxcSourceLocation** pResult);
-    __override HRESULT STDMETHODCALLTYPE GetNumDiagnostics(_Out_ unsigned* pValue);
-    __override HRESULT STDMETHODCALLTYPE GetDiagnostic(unsigned index, _Outptr_result_nullonfailure_ IDxcDiagnostic** pValue);
-    __override HRESULT STDMETHODCALLTYPE GetFile(_In_ const char* name, _Outptr_result_nullonfailure_ IDxcFile** pResult);
-    __override HRESULT STDMETHODCALLTYPE GetFileName(_Outptr_result_maybenull_ LPSTR* pResult);
-    __override HRESULT STDMETHODCALLTYPE Reparse(
+      _Outptr_result_nullonfailure_ IDxcSourceLocation** pResult) override;
+    HRESULT STDMETHODCALLTYPE GetNumDiagnostics(_Out_ unsigned* pValue) override;
+    HRESULT STDMETHODCALLTYPE GetDiagnostic(unsigned index, _Outptr_result_nullonfailure_ IDxcDiagnostic** pValue) override;
+    HRESULT STDMETHODCALLTYPE GetFile(_In_ const char* name, _Outptr_result_nullonfailure_ IDxcFile** pResult) override;
+    HRESULT STDMETHODCALLTYPE GetFileName(_Outptr_result_maybenull_ LPSTR* pResult) override;
+    HRESULT STDMETHODCALLTYPE Reparse(
       _In_count_(num_unsaved_files) IDxcUnsavedFile** unsaved_files,
-      unsigned num_unsaved_files);
-    __override HRESULT STDMETHODCALLTYPE GetCursorForLocation(_In_ IDxcSourceLocation* location, _Outptr_result_nullonfailure_ IDxcCursor** pResult);
-    __override HRESULT STDMETHODCALLTYPE GetLocationForOffset(_In_ IDxcFile* file, unsigned offset, _Outptr_ IDxcSourceLocation** pResult);
-    __override HRESULT STDMETHODCALLTYPE GetSkippedRanges(_In_ IDxcFile* file, _Out_ unsigned* pResultCount, _Outptr_result_buffer_(*pResultCount) IDxcSourceRange*** pResult);
-    __override HRESULT STDMETHODCALLTYPE GetDiagnosticDetails(unsigned index, DxcDiagnosticDisplayOptions options,
+      unsigned num_unsaved_files) override;
+    HRESULT STDMETHODCALLTYPE GetCursorForLocation(_In_ IDxcSourceLocation* location, _Outptr_result_nullonfailure_ IDxcCursor** pResult) override;
+    HRESULT STDMETHODCALLTYPE GetLocationForOffset(_In_ IDxcFile* file, unsigned offset, _Outptr_ IDxcSourceLocation** pResult) override;
+    HRESULT STDMETHODCALLTYPE GetSkippedRanges(_In_ IDxcFile* file, _Out_ unsigned* pResultCount, _Outptr_result_buffer_(*pResultCount) IDxcSourceRange*** pResult) override;
+    HRESULT STDMETHODCALLTYPE GetDiagnosticDetails(unsigned index, DxcDiagnosticDisplayOptions options,
       _Out_ unsigned* errorCode,
       _Out_ unsigned* errorLine,
       _Out_ unsigned* errorColumn,
       _Out_ BSTR* errorFile,
       _Out_ unsigned* errorOffset,
       _Out_ unsigned* errorLength,
-      _Out_ BSTR* errorMessage);
-    __override HRESULT STDMETHODCALLTYPE GetInclusionList(_Out_ unsigned* pResultCount, _Outptr_result_buffer_(*pResultCount) IDxcInclusion*** pResult);
+      _Out_ BSTR* errorMessage) override;
+    HRESULT STDMETHODCALLTYPE GetInclusionList(_Out_ unsigned* pResultCount, _Outptr_result_buffer_(*pResultCount) IDxcInclusion*** pResult) override;
 };
 
 class DxcType : public IDxcType
@@ -357,9 +357,9 @@ public:
   void Initialize(const CXType& type);
   static HRESULT Create(const CXType& type, _Outptr_result_nullonfailure_ IDxcType** pObject);
 
-  __override HRESULT STDMETHODCALLTYPE GetSpelling(_Outptr_result_maybenull_ LPSTR* pResult);
-  __override HRESULT STDMETHODCALLTYPE IsEqualTo(_In_ IDxcType* other, _Out_ BOOL* pResult);
-  __override HRESULT STDMETHODCALLTYPE GetKind(_Out_ DxcTypeKind* pResult);
+  HRESULT STDMETHODCALLTYPE GetSpelling(_Outptr_result_maybenull_ LPSTR* pResult) override;
+  HRESULT STDMETHODCALLTYPE IsEqualTo(_In_ IDxcType* other, _Out_ BOOL* pResult) override;
+  HRESULT STDMETHODCALLTYPE GetKind(_Out_ DxcTypeKind* pResult) override;
 };
 
 HRESULT CreateDxcIntelliSense(_In_ REFIID riid, _Out_ LPVOID* ppv);

+ 11 - 11
tools/clang/tools/libclang/dxcrewriteunused.cpp

@@ -54,10 +54,10 @@ private:
 public:
   RewriteUnusedASTConsumer() {
   }
-  __override void InitializeSema(Sema& S) {
+  void InitializeSema(Sema& S) override {
     m_sema = &S;
   }
-  __override void ForgetSema() {
+  void ForgetSema() override {
     m_sema = nullptr;
   }
 };
@@ -551,11 +551,11 @@ public:
     return DoBasicQueryInterface<IDxcRewriter, IDxcLangExtensions>(this, iid, ppvObject);
   }
 
-  __override HRESULT STDMETHODCALLTYPE RemoveUnusedGlobals(_In_ IDxcBlobEncoding *pSource,
-                                                           _In_z_ LPCWSTR pEntryPoint,
-                                                           _In_count_(defineCount) DxcDefine *pDefines,
-                                                           _In_ UINT32 defineCount,
-                                                           _COM_Outptr_ IDxcOperationResult **ppResult)
+  HRESULT STDMETHODCALLTYPE RemoveUnusedGlobals(_In_ IDxcBlobEncoding *pSource,
+                                                _In_z_ LPCWSTR pEntryPoint,
+                                                _In_count_(defineCount) DxcDefine *pDefines,
+                                                _In_ UINT32 defineCount,
+                                                _COM_Outptr_ IDxcOperationResult **ppResult) override
   {
     
     if (pSource == nullptr || ppResult == nullptr || (defineCount > 0 && pDefines == nullptr))
@@ -596,11 +596,11 @@ public:
     CATCH_CPP_RETURN_HRESULT();
   }
 
-  __override HRESULT STDMETHODCALLTYPE 
+  HRESULT STDMETHODCALLTYPE 
   RewriteUnchanged(_In_ IDxcBlobEncoding *pSource,
                    _In_count_(defineCount) DxcDefine *pDefines,
                    _In_ UINT32 defineCount,
-                   _COM_Outptr_ IDxcOperationResult **ppResult) {
+                   _COM_Outptr_ IDxcOperationResult **ppResult) override {
     if (pSource == nullptr || ppResult == nullptr || (defineCount > 0 && pDefines == nullptr))
       return E_POINTER;
 
@@ -641,7 +641,7 @@ public:
 
   }
 
-  __override HRESULT STDMETHODCALLTYPE RewriteUnchangedWithInclude(
+  HRESULT STDMETHODCALLTYPE RewriteUnchangedWithInclude(
       _In_ IDxcBlobEncoding *pSource,
       // Optional file name for pSource. Used in errors and include handlers.
       _In_opt_ LPCWSTR pSourceName, _In_count_(defineCount) DxcDefine *pDefines,
@@ -649,7 +649,7 @@ public:
       // user-provided interface to handle #include directives (optional)
       _In_opt_ IDxcIncludeHandler *pIncludeHandler,
       _In_ UINT32 rewriteOption,
-      _COM_Outptr_ IDxcOperationResult **ppResult) {
+      _COM_Outptr_ IDxcOperationResult **ppResult) override {
     if (pSource == nullptr || ppResult == nullptr || (defineCount > 0 && pDefines == nullptr))
       return E_POINTER;
 

+ 4 - 4
tools/clang/unittests/HLSL/CompilerTest.cpp

@@ -337,7 +337,7 @@ public:
   dxc::DxcDllSupport &m_dllSupport;
   HRESULT m_defaultErrorCode = E_FAIL;
   TestIncludeHandler(dxc::DxcDllSupport &dllSupport) : m_dwRef(0), callIndex(0), m_dllSupport(dllSupport) { }
-  __override HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, void** ppvObject) {
+  HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, void** ppvObject) override {
     return DoBasicQueryInterface<IDxcIncludeHandler>(this,  iid, ppvObject);
   }
 
@@ -363,10 +363,10 @@ public:
   std::vector<LoadSourceCallResult> CallResults;
   size_t callIndex;
 
-  __override HRESULT STDMETHODCALLTYPE LoadSource(
+  HRESULT STDMETHODCALLTYPE LoadSource(
     _In_ LPCWSTR pFilename,                   // Filename as written in #include statement
     _COM_Outptr_ IDxcBlob **ppIncludeSource   // Resultant source object for included file
-    ) {
+    ) override {
     CallInfos.push_back(LoadSourceCallInfo(pFilename));
 
     *ppIncludeSource = nullptr;
@@ -6081,4 +6081,4 @@ TEST_F(CompilerTest, SingleFileCheckTest) {
   }
 
   CodeGenTestCheckBatch(filename.c_str(), 0);
-}
+}

+ 12 - 12
tools/clang/unittests/HLSL/ExtensionTest.cpp

@@ -217,19 +217,19 @@ public:
     m_tables.push_back(IntrinsicTable(L"Buffer", std::begin(BufferIntrinsics), std::end(BufferIntrinsics)));
   }
   DXC_MICROCOM_ADDREF_RELEASE_IMPL(m_dwRef)
-  __override HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, void** ppvObject) {
+  HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, void** ppvObject) override {
     return DoBasicQueryInterface<IDxcIntrinsicTable>(this, iid, ppvObject);
   }
 
-  __override HRESULT STDMETHODCALLTYPE
-  GetTableName(_Outptr_ LPCSTR *pTableName) {
+  HRESULT STDMETHODCALLTYPE
+  GetTableName(_Outptr_ LPCSTR *pTableName) override {
     *pTableName = "test";
     return S_OK;
   }
 
-  __override HRESULT STDMETHODCALLTYPE LookupIntrinsic(
+  HRESULT STDMETHODCALLTYPE LookupIntrinsic(
       LPCWSTR typeName, LPCWSTR functionName, const HLSL_INTRINSIC **pIntrinsic,
-      _Inout_ UINT64 *pLookupCookie) {
+      _Inout_ UINT64 *pLookupCookie) override {
     if (typeName == nullptr)
       return E_FAIL;
 
@@ -254,8 +254,8 @@ public:
     return result.intrinsic ? S_OK : E_FAIL;
   }
 
-  __override HRESULT STDMETHODCALLTYPE
-  GetLoweringStrategy(UINT opcode, _Outptr_ LPCSTR *pStrategy) {
+  HRESULT STDMETHODCALLTYPE
+  GetLoweringStrategy(UINT opcode, _Outptr_ LPCSTR *pStrategy) override {
     Intrinsic *intrinsic = FindByOpcode(opcode);
     
     if (!intrinsic)
@@ -265,8 +265,8 @@ public:
     return S_OK;
   }
 
-  __override HRESULT STDMETHODCALLTYPE
-  GetIntrinsicName(UINT opcode, _Outptr_ LPCSTR *pName) {
+  HRESULT STDMETHODCALLTYPE
+  GetIntrinsicName(UINT opcode, _Outptr_ LPCSTR *pName) override {
     Intrinsic *intrinsic = FindByOpcode(opcode);
 
     if (!intrinsic)
@@ -276,8 +276,8 @@ public:
     return S_OK;
   }
 
-  __override HRESULT STDMETHODCALLTYPE
-  GetDxilOpCode(UINT opcode, _Outptr_ UINT *pDxilOpcode) {
+  HRESULT STDMETHODCALLTYPE
+  GetDxilOpCode(UINT opcode, _Outptr_ UINT *pDxilOpcode) override {
     if (opcode == 13) {
       *pDxilOpcode = static_cast<UINT>(hlsl::OP::OpCode::IsInf);
       return S_OK;
@@ -318,7 +318,7 @@ public:
   { }
   DXC_MICROCOM_ADDREF_RELEASE_IMPL(m_dwRef)
 
-    __override HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, void** ppvObject) {
+    HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, void** ppvObject) override {
     return DoBasicQueryInterface<IDxcSemanticDefineValidator>(this, iid, ppvObject);
   }
 

+ 17 - 18
tools/clang/unittests/HLSLHost/HLSLHost.cpp

@@ -736,8 +736,7 @@ public:
   }
 
   // ISequentialStream implementation.
-  __override HRESULT STDMETHODCALLTYPE Read(void *pv, ULONG cb,
-                                            ULONG *pcbRead) {
+  HRESULT STDMETHODCALLTYPE Read(void *pv, ULONG cb, ULONG *pcbRead) override {
     if (!pv)
       return E_POINTER;
     if (cb == 0)
@@ -764,8 +763,8 @@ public:
     return hr;
   }
 
-  __override HRESULT STDMETHODCALLTYPE Write(void const *pv, ULONG cb,
-                                             ULONG *pcbWritten) {
+  HRESULT STDMETHODCALLTYPE Write(void const *pv, ULONG cb,
+                                  ULONG *pcbWritten) override {
     if (!pv || !pcbWritten)
       return E_POINTER;
     if (cb == 0)
@@ -780,39 +779,39 @@ public:
   }
 
   // IStream implementation.
-  __override HRESULT STDMETHODCALLTYPE SetSize(ULARGE_INTEGER val) {
+  HRESULT STDMETHODCALLTYPE SetSize(ULARGE_INTEGER val) override {
     HhTrace(L"SetSize called - E_NOTIMPL");
     return E_NOTIMPL;
   }
 
-  __override HRESULT STDMETHODCALLTYPE CopyTo(IStream *, ULARGE_INTEGER,
-                                              ULARGE_INTEGER *,
-                                              ULARGE_INTEGER *) {
+  HRESULT STDMETHODCALLTYPE CopyTo(IStream *, ULARGE_INTEGER,
+                                   ULARGE_INTEGER *,
+                                   ULARGE_INTEGER *) override {
     return E_NOTIMPL;
   }
 
-  __override HRESULT STDMETHODCALLTYPE Commit(DWORD) { return E_NOTIMPL; }
+  HRESULT STDMETHODCALLTYPE Commit(DWORD) override { return E_NOTIMPL; }
 
-  __override HRESULT STDMETHODCALLTYPE Revert(void) { return E_NOTIMPL; }
+  HRESULT STDMETHODCALLTYPE Revert(void) override { return E_NOTIMPL; }
 
-  __override HRESULT STDMETHODCALLTYPE LockRegion(ULARGE_INTEGER,
-                                                  ULARGE_INTEGER, DWORD) {
+  HRESULT STDMETHODCALLTYPE LockRegion(ULARGE_INTEGER,
+                                       ULARGE_INTEGER, DWORD) override {
     return E_NOTIMPL;
   }
 
-  __override HRESULT STDMETHODCALLTYPE UnlockRegion(ULARGE_INTEGER,
-                                                    ULARGE_INTEGER, DWORD) {
+  HRESULT STDMETHODCALLTYPE UnlockRegion(ULARGE_INTEGER,
+                                         ULARGE_INTEGER, DWORD) override {
     return E_NOTIMPL;
   }
 
-  __override HRESULT STDMETHODCALLTYPE Clone(IStream **) { return E_NOTIMPL; }
+  HRESULT STDMETHODCALLTYPE Clone(IStream **) override { return E_NOTIMPL; }
 
-  __override HRESULT STDMETHODCALLTYPE Seek(LARGE_INTEGER, DWORD,
-                                            ULARGE_INTEGER *) {
+  HRESULT STDMETHODCALLTYPE Seek(LARGE_INTEGER, DWORD,
+                                 ULARGE_INTEGER *) override {
     return E_NOTIMPL;
   }
 
-  __override HRESULT STDMETHODCALLTYPE Stat(STATSTG *, DWORD) {
+  HRESULT STDMETHODCALLTYPE Stat(STATSTG *, DWORD) override {
     HhTrace(L"Stat called - E_NOTIMPL");
     return E_NOTIMPL;
   }

+ 2 - 2
tools/clang/unittests/dxc_batch/dxc_batch.cpp

@@ -561,9 +561,9 @@ public:
     return S_OK;
   }
 
-  __override HRESULT STDMETHODCALLTYPE
+  HRESULT STDMETHODCALLTYPE
   LoadSource(_In_ LPCWSTR pFilename,
-             _COM_Outptr_result_maybenull_ IDxcBlob **ppIncludeSource) {
+             _COM_Outptr_result_maybenull_ IDxcBlob **ppIncludeSource) override {
     try {
       *ppIncludeSource = includeFiles.at(std::wstring(pFilename));
       (*ppIncludeSource)->AddRef();

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff