[all-commits] [llvm/llvm-project] d685a3: Use symbol matching for types in llvm-mode.el (#19...

Tom Tromey via All-commits all-commits at lists.llvm.org
Tue May 26 09:03:38 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d685a3b0e30f1375acc2796f9ce9f090cec85332
      https://github.com/llvm/llvm-project/commit/d685a3b0e30f1375acc2796f9ce9f090cec85332
  Author: Tom Tromey <tromey at adacore.com>
  Date:   2026-05-26 (Tue, 26 May 2026)

  Changed paths:
    M llvm/utils/emacs/llvm-mode.el

  Log Message:
  -----------
  Use symbol matching for types in llvm-mode.el (#199250)

llvm-mode.el does this:

    (defconst llvm-mode-primitive-type-regexp
      (concat
       "\\(i[0-9]+\\|"
       (regexp-opt '(...strings...) t)

Here the "t" means to wrap the regexp in "\(..\)". However, this means
that in assembly like:

    !10 = distinct !DICompositeType(tag: DW_TAG_structure_type, ...

.. the "type" in "DW_TAG_structure_type" will be highlighted
differently.

The fix is to tell regexp-opt to only match complete symbols.



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