[llvm-bugs] [Bug 32244] New: clang-format formats valid c code into invalid one (incorrectly separating the token "<:" into "<" and ":")
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Mar 11 20:27:26 PST 2017
https://bugs.llvm.org/show_bug.cgi?id=32244
Bug ID: 32244
Summary: clang-format formats valid c code into invalid one
(incorrectly separating the token "<:" into "<" and
":")
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Formatter
Assignee: unassignedclangbugs at nondot.org
Reporter: chengniansun at gmail.com
CC: djasper at google.com, klimek at google.com,
llvm-bugs at lists.llvm.org
$ clang-format -version
clang-format version 5.0.0 (trunk 296436)
$
$ clang-format good.c | tee bad.c
main(int argc, char *argv< : :>)<% %>
$ clang-trunk -w good.c
$ clang-trunk -w bad.c
bad.c:1:26: error: expected ')'
main(int argc, char *argv< : :>)<% %>
^
bad.c:1:5: note: to match this '('
main(int argc, char *argv< : :>)<% %>
^
bad.c:1:1: error: second parameter of 'main' (argument array) must be of type
'char **'
main(int argc, char *argv< : :>)<% %>
^
2 errors generated.
$
$ cat good.c
main
(
int
argc
,
char
*
argv
<:
:>
)
<%
%>
$
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170312/a49113eb/attachment.html>
More information about the llvm-bugs
mailing list