http://llvm.org/bugs/show_bug.cgi?id=19536
Bug ID: 19536
Summary: clang-format SpaceBeforeParens option behaves oddly
with C++ delete
Product: new-bugs
Version: trunk
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
Basically, clang-format (svn trunk r206916, i.e. yesterday) transforms this:
------------
int main(void)
{
void* ptr1 = 0;
void* ptr2 = 0;
free(ptr1);
delete(ptr2);
}
------------
into this:
------------
int main(void)
{
void* ptr1 = 0;
void* ptr2 = 0;
free(ptr1);
delete (ptr2);
}
------------
Note the space added after "delete".
It does this if SpaceBeforeParens is set to either 'Never',
'ControlStatements', or 'Always', i.e. with all 3 possibilities.
The spacing after "free" behaves as you would expect from the SpaceBeforeParens
documentation.
I don't see why C++ delete should be special-cased.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs