r311947 - [analyzer] Adjust ptr arithmetic test
Alexander Shaposhnikov via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 28 15:58:54 PDT 2017
Author: alexshap
Date: Mon Aug 28 15:58:54 2017
New Revision: 311947
URL: http://llvm.org/viewvc/llvm-project?rev=311947&view=rev
Log:
[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.
Modified:
cfe/trunk/test/Analysis/ptr-arith.cpp
Modified: cfe/trunk/test/Analysis/ptr-arith.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/ptr-arith.cpp?rev=311947&r1=311946&r2=311947&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/ptr-arith.cpp (original)
+++ cfe/trunk/test/Analysis/ptr-arith.cpp Mon Aug 28 15:58:54 2017
@@ -107,7 +107,7 @@ unsigned ptrSubtractionNoCrash(char *Beg
}
// 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;
}
More information about the cfe-commits
mailing list