https://bugs.llvm.org/show_bug.cgi?id=33835

            Bug ID: 33835
           Summary: [clang-format] function arguments
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Formatter
          Assignee: unassignedclangb...@nondot.org
          Reporter: tob...@grosser.es
                CC: djas...@google.com, kli...@google.com,
                    llvm-bugs@lists.llvm.org

clang-format is breaking lines without need:

Using the option AlignAfterOpenBracket: DontAlign, I configured clang-format to
start the list of new parameters (almost) at the beginning of a new line:

It seems that without need, clang-format moves the first parameter on the
second line, while it perfectly would fit into the first line:


# Original (in our isl math library)
__isl_give isl_ast_expr *isl_ast_expr_get_op_arg(__isl_keep isl_ast_expr *expr, 
        int pos)                                                                
{                                                                               
        return 0;                                                               
}                                                                               

# clang-format
__isl_give isl_ast_expr *isl_ast_expr_get_op_arg(                               
        __isl_keep isl_ast_expr *expr, int pos)                                 
{                                                                               
        return 0;                                                               
}

I would prefer the first version. Is there a way to teach clang-format to
prefer the first version?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to