Fixes #60576.
Differential Revision: https://reviews.llvm.org/D143546
return true;
if (Style.isCpp()) {
+ // Space between UDL and dot: auto b = 4s .count();
+ if (Right.is(tok::period) && Left.is(tok::numeric_constant))
+ return true;
// Space between import <iostream>.
// or import .....;
if (Left.is(Keywords.kw_import) && Right.isOneOf(tok::less, tok::ellipsis))
verifyFormat("int i;\n", "int i;", Style);
}
+TEST_F(FormatTest, SpaceAfterUDL) {
+ verifyFormat("auto c = (4s).count();");
+ verifyFormat("auto x = 5s .count() == 5;");
+}
+
} // namespace
} // namespace format
} // namespace clang