[llvm-commits] [llvm] r158912 - /llvm/trunk/unittests/Support/AlignOfTest.cpp

Chandler Carruth chandlerc at gmail.com
Thu Jun 21 03:02:41 PDT 2012


Author: chandlerc
Date: Thu Jun 21 05:02:41 2012
New Revision: 158912

URL: http://llvm.org/viewvc/llvm-project?rev=158912&view=rev
Log:
Add a pragma to supress an MSVC warning on some of the absurd code I'm
using to test the alignment support library.

Patch from Nikola on IRC.

Modified:
    llvm/trunk/unittests/Support/AlignOfTest.cpp

Modified: llvm/trunk/unittests/Support/AlignOfTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/AlignOfTest.cpp?rev=158912&r1=158911&r2=158912&view=diff
==============================================================================
--- llvm/trunk/unittests/Support/AlignOfTest.cpp (original)
+++ llvm/trunk/unittests/Support/AlignOfTest.cpp Thu Jun 21 05:02:41 2012
@@ -16,6 +16,12 @@
 
 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;





More information about the llvm-commits mailing list