diff options
author | Nico Weber <nicolasweber@gmx.de> | 2013-01-10 00:25:19 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2013-01-10 00:25:19 +0000 |
commit | 51306d232edd03db956ba4007bea691ba5ceca20 (patch) | |
tree | b286835f90b75bef05a41991c1bb1058a663cca2 /clang/lib/Format/UnwrappedLineParser.cpp | |
parent | 04614ff6ba40b1eed86083a89c4267eb9ef579ff (diff) | |
download | bcm5719-llvm-51306d232edd03db956ba4007bea691ba5ceca20.tar.gz bcm5719-llvm-51306d232edd03db956ba4007bea691ba5ceca20.zip |
Formatter: @optional and @required go on their own line.
Previously:
@protocol myProtocol
- (void)mandatoryWithInt:(int)i;
@optional - (void) optional;
@required - (void) required;
@end
Now:
@protocol myProtocol
- (void)mandatoryWithInt:(int)i;
@optional
- (void)optional;
@required
- (void)required;
@end
llvm-svn: 172023
Diffstat (limited to 'clang/lib/Format/UnwrappedLineParser.cpp')
-rw-r--r-- | clang/lib/Format/UnwrappedLineParser.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Format/UnwrappedLineParser.cpp b/clang/lib/Format/UnwrappedLineParser.cpp index c049ac607d3..9b2a1e90e1f 100644 --- a/clang/lib/Format/UnwrappedLineParser.cpp +++ b/clang/lib/Format/UnwrappedLineParser.cpp @@ -215,6 +215,11 @@ void UnwrappedLineParser::parseStructuralElement() { return parseObjCProtocol(); case tok::objc_end: return; // Handled by the caller. + case tok::objc_optional: + case tok::objc_required: + nextToken(); + addUnwrappedLine(); + return; default: break; } |