summaryrefslogtreecommitdiffstats
path: root/clang/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
commit2ce0ac5a8c6773dbb36d20f93f78f481812e1a34 (patch)
tree79b08184e49ed93a44d91d8cb7c32b57f09e2f1a /clang/lib/Format/UnwrappedLineParser.cpp
parenteb994f4064175f39c44badf6b41419bc4890455e (diff)
downloadbcm5719-llvm-2ce0ac5a8c6773dbb36d20f93f78f481812e1a34.tar.gz
bcm5719-llvm-2ce0ac5a8c6773dbb36d20f93f78f481812e1a34.zip
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
Diffstat (limited to 'clang/lib/Format/UnwrappedLineParser.cpp')
-rw-r--r--clang/lib/Format/UnwrappedLineParser.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Format/UnwrappedLineParser.cpp b/clang/lib/Format/UnwrappedLineParser.cpp
index 1d0cb30af84..c049ac607d3 100644
--- a/clang/lib/Format/UnwrappedLineParser.cpp
+++ b/clang/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
OpenPOWER on IntegriCloud