Skip to content

Formatting long function header removes part of code #886

Description

@zegervdv

Test case

package foo;
  function some_large_return_type [$clog2(some_large_contant_name)-1:0] f_some_long_function( input int parameter_1, input int parameter_2);
    return 1;
  endfunction
endpackage

Formatting with default options gives:

Actual output

package foo;
  function some_large_return_type [$clog2(some_large_contant_name)-1:0] f_some_long_function(
    return 1;
  endfunction
endpackage

There are no errors produced, but the arguments to the function have been removed.
It only happens when the function return type contains the $clog2() call.

This behaviour is seen in version 0.0.1320 and is not present in 0.0.1261.

Expected or suggested output

package foo;
  function some_large_return_type [$clog2(some_large_contant_name)-1:0] f_some_long_function(
      input int parameter_1,
      input int paramter_2);
    return 1;
  endfunction
endpackage

Metadata

Metadata

Assignees

No one assigned

    Labels

    formatterVerilog code formatter issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions