[PATCH] D91968: llvm/ADT/StringExtras.h hexDigitValue - Init of integer buffer

Jerker B├Ąck via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 23 12:51:33 PST 2020


jerker.back updated this revision to Diff 307176.

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91968/new/

https://reviews.llvm.org/D91968

Files:
  llvm/include/llvm/ADT/StringExtras.h


Index: llvm/include/llvm/ADT/StringExtras.h
===================================================================
--- llvm/include/llvm/ADT/StringExtras.h
+++ llvm/include/llvm/ADT/StringExtras.h
@@ -71,7 +71,7 @@
     constexpr HexTable() {
       // Default initialize everything to invalid.
       for (int i = 0; i < 255; ++i)
-        LUT[i] = -1U;
+        LUT[i] = ~0U;
       // Initialize `0`-`9`.
       for (int i = 0; i < 10; ++i)
         LUT['0' + i] = i;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91968.307176.patch
Type: text/x-patch
Size: 468 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201123/4af9e843/attachment.bin>


More information about the llvm-commits mailing list