aboutsummaryrefslogtreecommitdiff
path: root/lib/Format/UnwrappedLineParser.cpp
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2013-01-09 23:25:37 +0000
committerNico Weber <nicolasweber@gmx.de>2013-01-09 23:25:37 +0000
commit50767d8c8f2f667255bdb99692c0467ce992bc67 (patch)
treebcdb26efc63c5f9b5810aeebb34b66e545ca0ee3 /lib/Format/UnwrappedLineParser.cpp
parentd017e42af00c2e7c380d0f9b27c81734f4b2844e (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172019 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/UnwrappedLineParser.cpp')
-rw-r--r--lib/Format/UnwrappedLineParser.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Format/UnwrappedLineParser.cpp b/lib/Format/UnwrappedLineParser.cpp
index 1d0cb30af8..c049ac607d 100644
--- a/lib/Format/UnwrappedLineParser.cpp
+++ b/lib/Format/UnwrappedLineParser.cpp
@@ -209,7 +209,8 @@ void UnwrappedLineParser::parseStructuralElement() {
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 @@ void UnwrappedLineParser::parseObjCUntilAtEnd() {
} while (!eof());
}
-void UnwrappedLineParser::parseObjCInterface() {
+void UnwrappedLineParser::parseObjCInterfaceOrImplementation() {
nextToken();
nextToken(); // interface name