forked from OSchip/llvm-project
Formatter: Make parseObjCUntilAtEnd() actually work.
llvm-svn: 172003
This commit is contained in:
parent
8696a8d9e3
commit
d8ffe75ad1
|
@ -212,6 +212,8 @@ void UnwrappedLineParser::parseStructuralElement() {
|
|||
return parseObjCInterface();
|
||||
case tok::objc_protocol:
|
||||
return parseObjCProtocol();
|
||||
case tok::objc_end:
|
||||
return; // Handled by the caller.
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -1189,6 +1189,8 @@ TEST_F(FormatTest, FormatObjCInterface) {
|
|||
"@end");
|
||||
|
||||
verifyFormat("@interface Foo\n"
|
||||
"@end\n"
|
||||
"@interface Bar\n"
|
||||
"@end");
|
||||
|
||||
verifyFormat("@interface Foo : Bar\n"
|
||||
|
@ -1262,6 +1264,11 @@ TEST_F(FormatTest, FormatObjCProtocol) {
|
|||
|
||||
verifyFormat("@protocol Foo;\n"
|
||||
"@protocol Bar;\n");
|
||||
|
||||
verifyFormat("@protocol Foo\n"
|
||||
"@end\n"
|
||||
"@protocol Bar\n"
|
||||
"@end");
|
||||
}
|
||||
|
||||
TEST_F(FormatTest, ObjCAt) {
|
||||
|
|
Loading…
Reference in New Issue