https://bugs.llvm.org/show_bug.cgi?id=48535
Bug ID: 48535
Summary: clang-format Incorrectly Removes Space After C Style
Cast When Type Is Not a Pointer
Product: new-bugs
Version: 11.0
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
Assignee: unassignedb...@nondot.org
Reporter: gavin.d.how...@gmail.com
CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org
Created attachment 24295
--> https://bugs.llvm.org/attachment.cgi?id=24295&action=edit
Style file
When I set the option "SpaceAfterCStyleCast" to true, clang-format will remove
a space after a C-style cast when the type inside the cast parentheses is not a
pointer time.
You can reproduce this by using the attached style file on
https://git.yzena.com/Yzena/Yc/src/branch/master/tests/fs/fs_read.c, lines 69
and 107.
If I add an asterisk after the size_t inside the parens, the space is left.
I speculate that clang-format incorrectly thinks that both sets of parens are
calls, i.e., that the first set is a call to a function that returns a function
pointer and that the second set is a call to that supposed returned function
pointer.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs