[all-commits] [llvm/llvm-project] 2ad73e: Give emitc.member_call_opaque operator precedence ...

Jeremy Kun via All-commits all-commits at lists.llvm.org
Mon Sep 28 10:28:30 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2ad73e6250f656aca147f024c0fe00d411f1c5c0
      https://github.com/llvm/llvm-project/commit/2ad73e6250f656aca147f024c0fe00d411f1c5c0
  Author: Jeremy Kun <jkun at google.com>
  Date:   2026-09-28 (Mon, 28 Sep 2026)

  Changed paths:
    M mlir/lib/Target/Cpp/TranslateToCpp.cpp
    M mlir/test/Target/Cpp/expressions.mlir

  Log Message:
  -----------
  Give emitc.member_call_opaque operator precedence (#226349)

The original problem here is that member_call_opaque could not be used
inside an emitc.expression. When I added the op to the precedence table,
I noticed that the emitter was generating spurious parentheses (e.g.,
`(v).at(i)`), and so, with AI help, I forwarded emitc::LoadOp operands
in CppEmitter::emitOperand when evaluating sub-expressions, so
lvalue-to-rvalue loads do not introduce spurious parentheses around
receiver variables.

---------

Co-authored-by: ioana ghiban <ioana.ghiban at arm.com>



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