[all-commits] [llvm/llvm-project] cab4c1: [mlir][AsmParser] Avoid use of moved value (#108789)

Youngsuk Kim via All-commits all-commits at lists.llvm.org
Mon Sep 16 02:00:01 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cab4c10eedfa4f2537877e96afc376fe47189b10
      https://github.com/llvm/llvm-project/commit/cab4c10eedfa4f2537877e96afc376fe47189b10
  Author: Youngsuk Kim <joseph942010 at gmail.com>
  Date:   2024-09-16 (Mon, 16 Sep 2024)

  Changed paths:
    M mlir/lib/AsmParser/Parser.cpp

  Log Message:
  -----------
  [mlir][AsmParser] Avoid use of moved value (#108789)

'std::string detailData' is moved in the innermost loop of a 2-layer
loop, but is written to throughout the whole duration of the 2-layer
loop.

After move, std::string is in an unspecified state
(implementation-dependent).

Avoid using a moved value, as it incurs undefined behavior.



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