[all-commits] [llvm/llvm-project] d7f98a: [Clang][NFC] Use std::move to avoid copy (#138073)

Shafik Yaghmour via All-commits all-commits at lists.llvm.org
Thu May 1 12:07:11 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d7f98a4ef9992936a92c2a71fec743ea6f3493d0
      https://github.com/llvm/llvm-project/commit/d7f98a4ef9992936a92c2a71fec743ea6f3493d0
  Author: Shafik Yaghmour <shafik.yaghmour at intel.com>
  Date:   2025-05-01 (Thu, 01 May 2025)

  Changed paths:
    M clang/lib/Lex/ModuleMap.cpp

  Log Message:
  -----------
  [Clang][NFC] Use std::move to avoid copy (#138073)

Static analysis flagged this code for using copy when we could use
std::move.

Worth noting that CD.Message is a StringRef but Conflict.Message is
std::string. Otherwise I would have used a temporary in place and avoid
a local variable.



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