Formatter: Add support for @implementation.
Just reuse the @interface code for this. It accepts slightly more than
necessary (@implementation cannot have protocol lists), but that's ok.
llvm-svn: 172019
diff --git a/clang/lib/Format/UnwrappedLineParser.cpp b/clang/lib/Format/UnwrappedLineParser.cpp
index 1d0cb30..c049ac6 100644
--- a/clang/lib/Format/UnwrappedLineParser.cpp
+++ b/clang/lib/Format/UnwrappedLineParser.cpp
@@ -209,7 +209,8 @@
case tok::objc_private:
return parseAccessSpecifier();
case tok::objc_interface:
- return parseObjCInterface();
+ case tok::objc_implementation:
+ return parseObjCInterfaceOrImplementation();
case tok::objc_protocol:
return parseObjCProtocol();
case tok::objc_end:
@@ -519,7 +520,7 @@
} while (!eof());
}
-void UnwrappedLineParser::parseObjCInterface() {
+void UnwrappedLineParser::parseObjCInterfaceOrImplementation() {
nextToken();
nextToken(); // interface name