[PATCH] D53509: Add unsgined char StringRef constructor/Fix llvm-strings crash

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 22 15:32:17 PDT 2018


efriedma added inline comments.


================
Comment at: tools/llvm-strings/llvm-strings.cpp:84
+  for (const unsigned char *P = B; P < E; ++P) {
     if (std::isgraph(*P) || std::isblank(*P)) {
       if (S == nullptr)
----------------
Could we just use something like `if (isPrint(*P) || *P == '\t')` to avoid the issue?  std::isgraph has other issues (see r338034).


Repository:
  rL LLVM

https://reviews.llvm.org/D53509





More information about the llvm-commits mailing list