Branch: refs/heads/topic/bbannier/cxx-struct-parameter-passing
Home:
https://github.com/zeek/spicy
Commit: 7b85e80ee3daf25fe89fddd9f2184a04db671955
https://github.com/zeek/spicy/commit/7b85e80ee3daf25fe89fddd9f2184a04db671955
Author: Benjamin Bannier <
benjamin...@corelight.com>
Date: 2025-10-01 (Wed, 01 Oct 2025)
Changed paths:
M hilti/toolchain/include/compiler/detail/cxx/elements.h
M hilti/toolchain/src/compiler/cxx/elements.cc
A tests/hilti/codegen/struct-parameter-passing.hlt
Log Message:
-----------
Fix C++ code generation for struct parameters passed as references.
Previously we could generate C++ moves for constructor arguments passed
as references. This is semantically incorrect, but seems to have had no
ill effects on code we generated. Since it could still confuse readers
and static analysis tools fix this to only generate moves if the
argument was passed as `copy`, but write out copies for all other
argument passing. This more clearly reflects what was already happening.
To unsubscribe from these emails, change your notification settings at
https://github.com/zeek/spicy/settings/notifications