[llvm-commits] [compiler-rt] r167297 - /compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_printf_test.cc
Dmitri Gribenko
gribozavr at gmail.com
Fri Nov 2 09:10:23 PDT 2012
On Fri, Nov 2, 2012 at 4:28 PM, Alexey Samsonov <samsonov at google.com> wrote:
> Modified: compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_printf_test.cc
> URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_printf_test.cc?rev=167297&r1=167296&r2=167297&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_printf_test.cc (original)
> +++ compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_printf_test.cc Fri Nov 2 09:28:17 2012
> @@ -28,8 +28,14 @@
> (unsigned)10, (unsigned long)11, // NOLINT
> (void*)0x123, "_string_");
> EXPECT_EQ(len, strlen(buf));
> - EXPECT_STREQ("a-1b-2c4294967292e5fahbq"
> - "0x000000000123e_string_r", buf);
> + void *ptr;
> + if (sizeof(ptr) == 4) {
> + EXPECT_STREQ("a-1b-2c4294967292e5fahbq"
> + "0x00000123e_string_r", buf);
> + } else {
> + EXPECT_STREQ("a-1b-2c4294967292e5fahbq"
> + "0x000000000123e_string_r", buf);
> + }
> }
Why not sizeof(void *)?
Dmitri
--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
More information about the llvm-commits
mailing list