[llvm] 160ab99 - [emacs] Highlight hexadecimal integer constants

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 18 11:54:19 PDT 2023


Author: Luke Lau
Date: 2023-08-18T19:54:13+01:00
New Revision: 160ab99539a1bcaadb6dff78b06d8660ca20826d

URL: https://github.com/llvm/llvm-project/commit/160ab99539a1bcaadb6dff78b06d8660ca20826d
DIFF: https://github.com/llvm/llvm-project/commit/160ab99539a1bcaadb6dff78b06d8660ca20826d.diff

LOG: [emacs] Highlight hexadecimal integer constants

Today I learnt about their existence (D158288), they just need to be prefixed
with a u or s.

Reviewed By: goldstein.w.n

Differential Revision: https://reviews.llvm.org/D158290

Added: 
    

Modified: 
    llvm/utils/emacs/llvm-mode.el

Removed: 
    


################################################################################
diff  --git a/llvm/utils/emacs/llvm-mode.el b/llvm/utils/emacs/llvm-mode.el
index 3970a51df5e77f..bb0804ad5fa378 100644
--- a/llvm/utils/emacs/llvm-mode.el
+++ b/llvm/utils/emacs/llvm-mode.el
@@ -43,7 +43,7 @@
    ;; Floating point constants
    '("\\b[-+]?[0-9]+.[0-9]*\\([eE][-+]?[0-9]+\\)?\\b" . font-lock-preprocessor-face)
    ;; Hex constants
-   '("\\b0x[0-9A-Fa-f]+\\b" . font-lock-preprocessor-face)
+   '("\\b[us]?0x[0-9A-Fa-f]+\\b" . font-lock-preprocessor-face)
    ;; Keywords
    `(,(regexp-opt
        '(;; Toplevel entities


        


More information about the llvm-commits mailing list