RFR: 8377895: Create sizeof_auto, to reduce narrowing conversions [v2]
Leo Korinth
lkorinth at openjdk.org
Mon Feb 16 14:10:18 UTC 2026
On Mon, 16 Feb 2026 12:28:10 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:
>> Nit: I think you can split these into multiple tests with more descriptive names overall, but that's up to you.
>>
>> For example, L341-L346 could be in a test called `SizeofAutoReturnsTheNumberOfBytesInAnArray` or something like that. This is very much my opinion rather than our style guide, so truly a nit.
>
>> I know that this isn't something that we follow today, but it's good practice to avoid underscores in test names when using Gtest. If you can call it SizeofAuto or sizeofAuto then I think that's preferred.
>
> Almost all of our gtest test uses underscores, so I think that Leo should stick with `_` for this PR.
I would like to understand the reason for the good practice to not use underscore. Then I can make a better informed decision. In this change, I copied the style of `jlong_from` directly above. I like that I can grep on the string without first transforming it (I can do that if I use the function name unchanged), but if there is a better reason for changing the name, I will take that into consideration.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29716#discussion_r2812608536
More information about the hotspot-dev
mailing list