Skip to content

Commit

Permalink
[LLVM][Alignment] Fix MSVC potential division by 0 warning (PR42911)
Browse files Browse the repository at this point in the history
Original Patch by @gchatelet (Guillaume Chatelet)

Differential Revision: https://reviews.llvm.org/D65859

llvm-svn: 369016
  • Loading branch information
RKSimon committed Aug 15, 2019
1 parent b2df99c commit 1c013ca
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions llvm/unittests/Support/AlignmentTest.cpp
Expand Up @@ -11,6 +11,12 @@

#include <vector>

#ifdef _MSC_VER
// Disable warnings about potential divide by 0.
#pragma warning(push)
#pragma warning(disable : 4723)
#endif

using namespace llvm;

namespace {
Expand Down Expand Up @@ -298,3 +304,7 @@ TEST(AlignmentDeathTest, CompareAlignToUndefMaybeAlign) {
#endif // NDEBUG

} // end anonymous namespace

#ifdef _MSC_VER
#pragma warning(pop)
#endif

0 comments on commit 1c013ca

Please sign in to comment.