https://bugs.llvm.org/show_bug.cgi?id=44479
Bug ID: 44479
Summary: incorrect indentation of arguments of a function call
when the function name start on the next IndentWidth.
Product: clang
Version: 9.0
Hardware: PC
OS: Linux
Status: NEW
Severity: release blocker
Priority: P
Component: -New Bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected]
---- INPUT -----
void normalFunctionName()
{
if (functionName(loooooooooooongParam1, loooooooooooooongParam2,
looooooooooongParam3)) {
return;
}
}
---- EXPECTED OUTPUT ----
void normalFunctionName()
{
if (functionName(
loooooooooooongParam1,
loooooooooooooongParam2,
looooooooooongParam3)) {
return;
}
}
---- CLANG-FORMAT OUTPUT---- (extra indentation on the arguments)
void normalFunctionName()
{
if (functionName(
loooooooooooongParam1,
loooooooooooooongParam2,
looooooooooongParam3)) {
return;
}
}
The result have an extra indentation on the arguments of 4 spaces. This happens
always that the name of the function call starts on the next indentation (8
spaces). The indentation should not be measure base on the function name,
should be measured starting with the <<if>> statement.
---- Related clang-format rules ----
BasedOnStyle: WebKit
ColumnLimit: 80
IndentWidth: 4
ContinuationIndentWidth: 8
AlignAfterOpenBracket: AlwaysBreak
AllowAllParametersOfDeclarationOnNextLine: false
AllowAllArgumentsOnNextLine: false
AlwaysBreakAfterReturnType: None
BinPackParameters: false
BinPackArguments: false
ExperimentalAutoDetectBinPacking: false
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs