Page MenuHomePhabricator

[clang-format] [PR45626] SpacesInAngles does not insert or preserve leading space before :: operator
ClosedPublic

Authored by MyDeveloperDay on Apr 30 2020, 6:35 AM.

Details

Summary

See https://bugs.llvm.org/show_bug.cgi?id=45626

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
void f() {

(void)static_cast<::std::uint32_t >(1);
(void)static_cast<::std::uint32_t >(1);

}

This revision fixes that behavior

Diff Detail

Event Timeline

MyDeveloperDay created this revision.Apr 30 2020, 6:35 AM
krasimir accepted this revision.Apr 30 2020, 7:40 AM

Thank you!

clang/unittests/Format/FormatTest.cpp
8500

nit: I suppose this newline was not intended.

This revision is now accepted and ready to land.Apr 30 2020, 7:40 AM

Update so the pre-merge checks do there thing

This revision was automatically updated to reflect the committed changes.