[llvm-bugs] [Bug 45626] New: SpacesInAngles: true does not insert or preserve leading space before :: operator
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Apr 21 00:40:50 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=45626
Bug ID: 45626
Summary: SpacesInAngles: true does not insert or preserve
leading space before :: operator
Product: clang
Version: 10.0
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: Formatter
Assignee: unassignedclangbugs at nondot.org
Reporter: aron.mueller at curtis.ch
CC: djasper at google.com, klimek at google.com,
llvm-bugs at lists.llvm.org
"SpacesInAngles: true" does not insert or preserve the leading space character
when there is a '::' after the opening angle bracket '<'.
Assume a file 'bug.cpp' with these lines:
#include <cstdint>
void f()
{
(void)static_cast<::std::uint32_t>(1);
(void)static_cast< ::std::uint32_t >(1);
}
Running
clang-format -style="{SpacesInAngles: true}" bug.cpp
produces
#include <cstdint>
void f() {
(void)static_cast<::std::uint32_t >(1);
(void)static_cast<::std::uint32_t >(1);
}
The trailing space is inserted/preserved correctly before the '>' but there
never is a leading space after the '<'.
Produced with clang-format version 10.0.0 on Windows 10 Pro (10.0.18363 Build
18363).
--
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/20200421/a627fd8e/attachment.html>
More information about the llvm-bugs
mailing list