[PATCH] D116313: [MSVC] Silence -Wnon-virtual-dtor on DIA APIs
Alexandre Ganea via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 27 08:04:11 PST 2021
aganea created this revision.
aganea added reviewers: mstorsjo, amccarth, hans.
aganea requested review of this revision.
Herald added projects: clang, LLVM.
Herald added subscribers: llvm-commits, cfe-commits.
When building LLVM with Clang 13.0 on Windows, I see a bunch of `-Wnon-virtual-dtor` errors on DIA (Debug Interface Access) COM APIs.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D116313
Files:
clang/lib/Driver/ToolChains/MSVC.cpp
llvm/include/llvm/DebugInfo/PDB/DIA/DIASupport.h
Index: llvm/include/llvm/DebugInfo/PDB/DIA/DIASupport.h
===================================================================
--- llvm/include/llvm/DebugInfo/PDB/DIA/DIASupport.h
+++ llvm/include/llvm/DebugInfo/PDB/DIA/DIASupport.h
@@ -27,7 +27,14 @@
// DIA headers must come after windows headers.
#include <cvconst.h>
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
+#endif
#include <dia2.h>
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
#include <diacreate.h>
#endif // LLVM_DEBUGINFO_PDB_DIA_DIASUPPORT_H
Index: clang/lib/Driver/ToolChains/MSVC.cpp
===================================================================
--- clang/lib/Driver/ToolChains/MSVC.cpp
+++ clang/lib/Driver/ToolChains/MSVC.cpp
@@ -47,7 +47,14 @@
// Make sure this comes before MSVCSetupApi.h
#include <comdef.h>
+#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));
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116313.396312.patch
Type: text/x-patch
Size: 1245 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211227/d0de324b/attachment.bin>
More information about the cfe-commits
mailing list