From 68dcb655edd864c36a91f746e3744fd115a69c9a Mon Sep 17 00:00:00 2001 From: Alexander Shaposhnikov Date: Mon, 28 Aug 2017 22:58:54 +0000 Subject: [PATCH] [analyzer] Adjust ptr arithmetic test Replace "long" with __UINTPTR_TYPE__ to make the test added in rL311935 Windows-friendly. Caught by the buildbot llvm-clang-x86_64-expensive-checks-win. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@311947 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Analysis/ptr-arith.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/Analysis/ptr-arith.cpp b/test/Analysis/ptr-arith.cpp index f546d5ae7c..01adf476e4 100644 --- a/test/Analysis/ptr-arith.cpp +++ b/test/Analysis/ptr-arith.cpp @@ -107,7 +107,7 @@ unsigned ptrSubtractionNoCrash(char *Begin, char *End) { } // Bug 34309 -bool ptrAsIntegerSubtractionNoCrash(long x, char *p) { - long y = (long)p - 1; +bool ptrAsIntegerSubtractionNoCrash(__UINTPTR_TYPE__ x, char *p) { + __UINTPTR_TYPE__ y = (__UINTPTR_TYPE__)p - 1; return y == x; } -- 2.49.0