[all-commits] [llvm/llvm-project] 8330dc: [llvm-rc] Allow -1 for menu item IDs

Martin Storsjö via All-commits all-commits at lists.llvm.org
Sat Mar 28 05:57:22 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 8330dcadb841cddcbe1318f2cd663b2787407f58
      https://github.com/llvm/llvm-project/commit/8330dcadb841cddcbe1318f2cd663b2787407f58
  Author: Martin Storsjö <martin at martin.st>
  Date:   2020-03-28 (Sat, 28 Mar 2020)

  Changed paths:
    M llvm/test/tools/llvm-rc/Inputs/tag-menu.rc
    M llvm/test/tools/llvm-rc/tag-menu.test
    M llvm/tools/llvm-rc/ResourceFileWriter.cpp

  Log Message:
  -----------
  [llvm-rc] Allow -1 for menu item IDs

This seems to be used in some resource files, e.g.
https://github.com/wxWidgets/wxWidgets/blob/f3217573d7240411e7817c9d76d965b2452987a2/include/wx/msw/wx.rc#L28.

MSVC rc.exe and GNU windres both allow any value here, and silently
just truncate to uint16_t range. This just explicitly allows the
-1 value and errors out on others - the same was done for control
IDs in dialogs in c1a67857ba0a6ba558818b589fe7c0fcc8f238ae.

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




More information about the All-commits mailing list