diff --git a/clang/lib/Driver/ToolChains/MSVC.cpp b/clang/lib/Driver/ToolChains/MSVC.cpp --- a/clang/lib/Driver/ToolChains/MSVC.cpp +++ b/clang/lib/Driver/ToolChains/MSVC.cpp @@ -47,7 +47,14 @@ // Make sure this comes before MSVCSetupApi.h #include +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wnon-virtual-dtor" +#endif #include "MSVCSetupApi.h" +#ifdef __clang__ +#pragma clang diagnostic pop +#endif #include "llvm/Support/COM.h" _COM_SMARTPTR_TYPEDEF(ISetupConfiguration, __uuidof(ISetupConfiguration)); _COM_SMARTPTR_TYPEDEF(ISetupConfiguration2, __uuidof(ISetupConfiguration2)); diff --git a/llvm/include/llvm/DebugInfo/PDB/DIA/DIASupport.h b/llvm/include/llvm/DebugInfo/PDB/DIA/DIASupport.h --- a/llvm/include/llvm/DebugInfo/PDB/DIA/DIASupport.h +++ b/llvm/include/llvm/DebugInfo/PDB/DIA/DIASupport.h @@ -27,7 +27,14 @@ // DIA headers must come after windows headers. #include +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wnon-virtual-dtor" +#endif #include +#ifdef __clang__ +#pragma clang diagnostic pop +#endif #include #endif // LLVM_DEBUGINFO_PDB_DIA_DIASUPPORT_H