[llvm] [vim] Match more hexadecimal float constants (PR #99000)

Fraser Cormack via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 16 01:18:29 PDT 2024


https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/99000

>From b77a9d6a86fdcb362cf46622f9322d1840ec6c1c Mon Sep 17 00:00:00 2001
From: Fraser Cormack <frasercrmck at gmail.com>
Date: Tue, 16 Jul 2024 09:14:26 +0100
Subject: [PATCH] [vim] Match more hexadecimal float constants

The 0x[KLMHR] syntax denotes different floating-point types: various
long doubles, half and bfloat.
---
 llvm/utils/vim/syntax/llvm.vim | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/utils/vim/syntax/llvm.vim b/llvm/utils/vim/syntax/llvm.vim
index a3eb010989ef6..a9c91277f33fd 100644
--- a/llvm/utils/vim/syntax/llvm.vim
+++ b/llvm/utils/vim/syntax/llvm.vim
@@ -218,7 +218,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