[all-commits] [llvm/llvm-project] 4f5ae8: [Support] Allow \n, \t, \x in regexes (#223024)

Harald van Dijk via All-commits all-commits at lists.llvm.org
Wed Sep 23 09:45:22 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4f5ae89a4a8c49549cd3884c1f42f3fbba8d8ff3
      https://github.com/llvm/llvm-project/commit/4f5ae89a4a8c49549cd3884c1f42f3fbba8d8ff3
  Author: Harald van Dijk <hdijk at accesssoftek.com>
  Date:   2026-09-23 (Wed, 23 Sep 2026)

  Changed paths:
    M lldb/test/Shell/Settings/Inputs/EchoCommandsAll.out
    M lldb/test/Shell/Settings/Inputs/EchoCommandsNoComments.out
    M lldb/test/Shell/Settings/Inputs/EchoCommandsNone.out
    M llvm/lib/Support/Regex.cpp
    M llvm/lib/Support/regcomp.c
    A llvm/test/FileCheck/escape.txt
    M llvm/unittests/Support/RegexTest.cpp

  Log Message:
  -----------
  [Support] Allow \n, \t, \x in regexes (#223024)

\n and \t were already permitted in Regex::sub, but not in the regex
pattern itself. This commit allows them there too.

\x was not supported at all. This commit allows it both in regex
patterns and in Regex::sub.

The goal is to allow \x to be used in FileCheck patterns and to that
end, a test is also included that this works in FileCheck as expected.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list