[all-commits] [llvm/llvm-project] 9415b7: [Support] Fix -Wpessimizing-move in Mustache.cpp (...

Jie Fu (傅杰) via All-commits all-commits at lists.llvm.org
Tue Mar 11 17:59:22 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9415b7d97fc38d0b8f3de63f7ba6ff6a5072158e
      https://github.com/llvm/llvm-project/commit/9415b7d97fc38d0b8f3de63f7ba6ff6a5072158e
  Author: Jie Fu <jiefu at tencent.com>
  Date:   2025-03-12 (Wed, 12 Mar 2025)

  Changed paths:
    M llvm/lib/Support/Mustache.cpp

  Log Message:
  -----------
  [Support] Fix -Wpessimizing-move in Mustache.cpp (NFC)

/llvm-project/llvm/lib/Support/Mustache.cpp:299:27:
error: moving a temporary object prevents copy elision [-Werror,-Wpessimizing-move]
    PrevToken.TokenBody = std::move(Unindented.str());
                          ^
/llvm-project/llvm/lib/Support/Mustache.cpp:299:27: note: remove std::move call here
    PrevToken.TokenBody = std::move(Unindented.str());
                          ^~~~~~~~~~                ~
1 error generated.



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