https://bugs.llvm.org/show_bug.cgi?id=40480
Bug ID: 40480
Summary: clang-format gets confused with custom for each macro
Product: clang
Version: 7.0
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Formatter
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected]
For the test case below that uses a for each macro M_EACH provided by some
library to iterate over a container:
int f(aint_t a)
{
int s = 0;
for M_EACH(item, a, aint_t) {
int z = *item;
s += z;
}
return s;
}
is transformed into:
int f(aint_t a) {
int s = 0;
for
M_EACH(item, a, aint_t) {
int z = *item;
s += z;
}
return s;
}
There is no option to prevent the end of line after the for and before the
M_EACH macro.
--
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