Skip to content

[clang-tidy] wrong fixup for bugprone-implicit-widening-of-multiplication-result #56728

Closed
@Febbe

Description

$ clang-tidy --version
LLVM (http://llvm.org/):
  LLVM version 14.0.6
  Optimized build.
  Default target: x86_64-pc-windows-msvc
  Host CPU: znver2

clang tidy tries to fix the following:

TEST(test_mem, std_list_in_vmem) {
    monotonic_virtual_memory_resource vmem(1024 * 1024, 1024 * 1024 * 1024);
    {/*<code>*/}
TEST(test_mem, std_list_in_vmem) {
    monotonic_virtual_memory_resource vmem(1024 * 1024, 1024 * 1024 * 1024);
    {/*<code>*/}
// TODO this does not test
TEST(test_mem, std_list_in_vmem) {
    monotonic_virtual_memory_resource vmem(static_cast<size_t>(1024 * )1024, 1024 * 1024 * 1024);
    {

This results in code which is not compilable anymore.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions