[all-commits] [llvm/llvm-project] c82b7f: [lldb] Remove redundant severity substring within ...

Pete Lawrence via All-commits all-commits at lists.llvm.org
Thu Jan 18 12:04:38 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c82b7fddfcbd6adfae4faf324a453fb8652efa91
      https://github.com/llvm/llvm-project/commit/c82b7fddfcbd6adfae4faf324a453fb8652efa91
  Author: Pete Lawrence <plawrence at apple.com>
  Date:   2024-01-18 (Thu, 18 Jan 2024)

  Changed paths:
    M lldb/source/Expression/DiagnosticManager.cpp
    M lldb/test/API/lang/objc/modules-compile-error/TestModulesCompileError.py

  Log Message:
  -----------
  [lldb] Remove redundant severity substring within a diagnostic message. (#76111)

For example, the following message has the severity string "error: "
twice.
	> "error: <EXPR>:3:1: error: cannot find 'bogus' in scope

This method already appends the severity string in the beginning, but
with this fix, it also removes a secondary instance, if applicable.

Note that this change only removes the *first* redundant substring. I
considered putting the removal logic in a loop, but I decided that if
something is generating more than one redundant severity substring, then
that's a problem the message's source should probably fix.

rdar://114203423




More information about the All-commits mailing list