[llvm] 2e56497 - [Utils][vim] Match more hexadecimal float constants (#99000)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 17 02:12:50 PDT 2024


Author: Fraser Cormack
Date: 2024-07-17T10:12:46+01:00
New Revision: 2e56497bf7b2c848b2c43ce8c64e585bc006240a

URL: https://github.com/llvm/llvm-project/commit/2e56497bf7b2c848b2c43ce8c64e585bc006240a
DIFF: https://github.com/llvm/llvm-project/commit/2e56497bf7b2c848b2c43ce8c64e585bc006240a.diff

LOG: [Utils][vim] Match more hexadecimal float constants (#99000)

The `0x[KLMHR]` syntax denotes different floating-point types: various
long doubles, half and bfloat.

See https://llvm.org/docs/LangRef.html#simple-constants for reference.

Added: 
    

Modified: 
    llvm/utils/vim/syntax/llvm.vim

Removed: 
    


################################################################################
diff  --git a/llvm/utils/vim/syntax/llvm.vim b/llvm/utils/vim/syntax/llvm.vim
index 2a294223269ba..fac509c355cb8 100644
--- a/llvm/utils/vim/syntax/llvm.vim
+++ b/llvm/utils/vim/syntax/llvm.vim
@@ -219,7 +219,7 @@ syn keyword llvmError  getresult begin end
 syn match   llvmNoName /[%@!]\d\+\>/
 syn match   llvmNumber /-\?\<\d\+\>/
 syn match   llvmFloat  /-\?\<\d\+\.\d*\(e[+-]\d\+\)\?\>/
-syn match   llvmFloat  /\<0x\x\+\>/
+syn match   llvmFloat  /\<0x[KLMHR]\?\x\+\>/
 syn keyword llvmBoolean true false
 syn keyword llvmConstant zeroinitializer undef null none poison vscale
 syn match   llvmComment /;.*$/


        


More information about the llvm-commits mailing list