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: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected]
"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._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs