[llvm] [NFC][TableGen] Refactor SequenceToOffsetTable class. (PR #104986)

Yanzuo Liu via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 20 08:38:59 PDT 2024


================
@@ -140,6 +140,15 @@ inline bool isPrint(char C) {
   return (0x20 <= UC) && (UC <= 0x7E);
 }
 
+/// Checks whether character \p C is a punctuation character.
+///
+/// Locale-independent version of the C standard library ispunct.
+inline bool isPunct(char C) {
+  static constexpr StringRef Punctuations =
+      R"((!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~))";
----------------
zwuis wrote:

```suggestion
      R"(!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~)";
```


https://github.com/llvm/llvm-project/pull/104986


More information about the llvm-commits mailing list