[zeek/spicy] 451a1d: Disambiguate constructor calls from function decla...

0 views
Skip to first unread message

Benjamin Bannier

unread,
Jun 17, 2026, 4:55:09 AMJun 17
to spicy-...@zeek.org
Branch: refs/heads/topic/bbannier/issue-2404
Home: https://github.com/zeek/spicy
Commit: 451a1df60f9236f4f82fc6e24cd7c55391b68694
https://github.com/zeek/spicy/commit/451a1df60f9236f4f82fc6e24cd7c55391b68694
Author: Benjamin Bannier <benjamin...@corelight.com>
Date: 2026-06-17 (Wed, 17 Jun 2026)

Changed paths:
M hilti/toolchain/src/compiler/codegen/coercions.cc
M hilti/toolchain/src/compiler/codegen/ctors.cc
M hilti/toolchain/src/compiler/codegen/operators.cc
M tests/Baseline/hilti.hiltic.print.globals/output
M tests/Baseline/hilti.hiltic.print.globals/output2
M tests/Baseline/hilti.hiltic.print.hello-world/output
M tests/Baseline/hilti.hiltic.print.import/output
M tests/Baseline/hilti.hiltic.print.import/output2
M tests/Baseline/hilti.hiltic.print.yield/output
M tests/Baseline/hilti.types.tuple.coercion/output
M tests/Baseline/spicy.tools.preprocessor/output
M tests/Baseline/spicy.tools.spicyc-hello-world/test.hlt

Log Message:
-----------
Disambiguate constructor calls from function declarations

We previously called constructors as `T(..)` which without context could
lead to most vexing parses. In this patch we replace most constructor
calls in type creations and coercions with `T{..}` instead to avoid any
downstream issues, especially since we have passes which might remove
the LHS.


Commit: 2b66bbdd9ec3a2d1a84228df1cc63a7056f03132
https://github.com/zeek/spicy/commit/2b66bbdd9ec3a2d1a84228df1cc63a7056f03132
Author: Benjamin Bannier <benjamin...@corelight.com>
Date: 2026-06-17 (Wed, 17 Jun 2026)

Changed paths:
M hilti/toolchain/src/compiler/codegen/coercions.cc

Log Message:
-----------
Stop emitting unneeded constructor in codegen for list comprehensions

Since `Set` can implicitly construct from an initializer list, there is
no need to add an explicit constructor call, so in this patch we remove
it to further reduced potential for us accidentially generating code
causing most vexing parses.


Compare: https://github.com/zeek/spicy/compare/6fd4e5bfa93f...2b66bbdd9ec3

To unsubscribe from these emails, change your notification settings at https://github.com/zeek/spicy/settings/notifications
Reply all
Reply to author
Forward
0 new messages