[llvm-commits] [PATCH][AddressSanitizer] Make lib\asan compileable using Visual Studio

Alexander Potapenko glider at google.com
Fri Jan 27 06:49:43 PST 2012


+  unsigned long ret = -1;  // NOLINT
+  _BitScanForward64(&ret, x);
+  return ret;
+#elif defined(_WIN32)
+  unsigned long ret = -1;  // NOLINT

Why do you need this initial value? This is not required from
__builtin_clz-like functions, and anyway checking for x to be nonzero
is better.



More information about the llvm-commits mailing list