[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 10:00:02 PST 2020


jerker.back added a comment.

How to submit a new patch?



================
Comment at: llvm/include/llvm/ADT/StringExtras.h:74
-      for (int i = 0; i < 255; ++i)
-        LUT[i] = -1U;
       // Initialize `0`-`9`.
----------------
lebedev.ri wrote:
> How about just `~0U` ?
Yes, of course

 
```
LUT[i] = ~0U;
```

works without the compiler complaining



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91968



More information about the llvm-commits mailing list