This fixes llvm.org/PR17241.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195555
91177308-0d34-0410-b5e6-
96231b3b80d8
void UnwrappedLineParser::parseAccessSpecifier() {
nextToken();
+ // Understand Qt's slots.
+ if (FormatTok->is(tok::identifier) && FormatTok->TokenText == "slots")
+ nextToken();
// Otherwise, we don't know what it is, and we'd better keep the next token.
if (FormatTok->Tok.is(tok::colon))
nextToken();
" private:\n"
" void f() {}\n"
"};");
+ verifyFormat("class A {\n"
+ "public slots:\n"
+ " void f() {}\n"
+ "};");
}
TEST_F(FormatTest, SeparatesLogicalBlocks) {