[all-commits] [llvm/llvm-project] e28cd7: [OptTable] Reapply Improve error message output fo...

gbreynoo via All-commits all-commits at lists.llvm.org
Fri Sep 3 03:14:26 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e28cd75a5039893db5861f49eeea9eb5b59bdcdc
      https://github.com/llvm/llvm-project/commit/e28cd75a5039893db5861f49eeea9eb5b59bdcdc
  Author: gbreynoo <Owen.Reynolds at sony.com>
  Date:   2021-09-03 (Fri, 03 Sep 2021)

  Changed paths:
    M llvm/lib/Option/OptTable.cpp
    M llvm/test/tools/llvm-objcopy/tool-help-message.test
    M llvm/unittests/Option/OptionParsingTest.cpp

  Log Message:
  -----------
  [OptTable] Reapply Improve error message output for grouped short options

This reapplies 71d7fed3bc2ad6c22729d446526a59fcfd99bd03 which was
reverted by 3e2bd82f02c6cbbfb0544897c7645867f04b3a7e. This change
includes the fix for breaking the sanitizer bots.

As seen in https://bugs.llvm.org/show_bug.cgi?id=48880 the current
implementation for parsing grouped short options can return unclear
error messages. This change fixes the example given in the ticket in
which a flag is incorrectly given an argument. Also when parsing a
group we now keep reading past the first incorrect option and output
errors for all incorrect options in the group.

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




More information about the All-commits mailing list