From 2ce0ac5a8c6773dbb36d20f93f78f481812e1a34 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Wed, 9 Jan 2013 23:25:37 +0000 Subject: 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 --- clang/lib/Format/UnwrappedLineParser.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'clang/lib/Format/UnwrappedLineParser.cpp') 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 -- cgit v1.2.3