[all-commits] [llvm/llvm-project] 2b15fb: [gold] Don't pass StringRef to message() (#95083)

Nikita Popov via All-commits all-commits at lists.llvm.org
Tue Jun 11 06:27:14 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2b15fb16cee05e6fe56edc6bc24d4d31df48a115
      https://github.com/llvm/llvm-project/commit/2b15fb16cee05e6fe56edc6bc24d4d31df48a115
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2024-06-11 (Tue, 11 Jun 2024)

  Changed paths:
    M llvm/tools/gold/gold-plugin.cpp

  Log Message:
  -----------
  [gold] Don't pass StringRef to message() (#95083)

This is a printf style variadic function. If using a "%s" format, we
should pass "const char *" rather than "StringRef".

The use of data() here is safe because we know that the StringRef was
originally derived from a null-terminated string.



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