Add a pragma to supress an MSVC warning on some of the absurd code I'm
authorChandler Carruth <chandlerc@gmail.com>
Thu, 21 Jun 2012 10:02:41 +0000 (10:02 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Thu, 21 Jun 2012 10:02:41 +0000 (10:02 +0000)
using to test the alignment support library.

Patch from Nikola on IRC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158912 91177308-0d34-0410-b5e6-96231b3b80d8

unittests/Support/AlignOfTest.cpp

index 278c7a71f4ba759c5d5fdb19003f224bdfc5e8bf..c45db2cdc007f78ab1d71d48c716e3f54b353a17 100644 (file)
@@ -16,6 +16,12 @@ using namespace llvm;
 
 namespace {
 
+// Disable warnings about questionable type definitions.
+// We're testing that even questionable types work with the alignment utilities.
+#ifdef _MSC_VER
+#pragma warning(disable:4584)
+#endif
+
 // Define some fixed alignment types to use in these tests.
 #if __cplusplus == 201103L || __has_feature(cxx_alignas)
 typedef char alignas(1) A1;