[clang] [Clang][NFC] remove CHAR_PUNCT duplication introduced by #93216 (PR #93605)

via cfe-commits cfe-commits at lists.llvm.org
Tue May 28 12:58:41 PDT 2024


https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/93605

None

>From ac1d7edcca20a0eebf884ca770c72b39a90f9889 Mon Sep 17 00:00:00 2001
From: Corentin Jabot <corentinjabot at gmail.com>
Date: Tue, 28 May 2024 21:57:06 +0200
Subject: [PATCH] [Clang][NFC] remove CHAR_PUNCT duplication introduced by
 #93216

---
 clang/include/clang/Basic/CharInfo.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/clang/include/clang/Basic/CharInfo.h b/clang/include/clang/Basic/CharInfo.h
index 4d90528f7992e..d71857e8e5dcc 100644
--- a/clang/include/clang/Basic/CharInfo.h
+++ b/clang/include/clang/Basic/CharInfo.h
@@ -151,8 +151,7 @@ LLVM_READONLY inline bool isHexDigit(unsigned char c) {
 /// Note that '_' is both a punctuation character and an identifier character!
 LLVM_READONLY inline bool isPunctuation(unsigned char c) {
   using namespace charinfo;
-  return (InfoTable[c] &
-          (CHAR_UNDER | CHAR_PERIOD | CHAR_PUNCT | CHAR_PUNCT)) != 0;
+  return (InfoTable[c] & (CHAR_UNDER | CHAR_PERIOD | CHAR_PUNCT)) != 0;
 }
 
 /// Return true if this character is an ASCII printable character; that is, a



More information about the cfe-commits mailing list